How to Insert and then print data from jagged array in below code ?
int *jagged[5];
jagged[0] = malloc(sizeof(int) * 10);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can insert by adding a second subscript for the nested array’s index.
and print like
Keep in mind that you need to keep track of each nested array’s length on your own. Depending on your needs, you might do something like