Question: Create Student List Using Dynamic Memory Allocation Complete the function studentList that dynamically allocates memory to store the student's name and creates a list of

Create Student List Using Dynamic Memory Allocation
Complete the function studentList that dynamically allocates memory to store the student's name and creates a list of students. You are given a student structure that has two attributes name as a string to store the name of the student and next as a pointer to the same student structure to store the address of the next student information in the list, if no next student exist in the list then it stores NULL. Function studentList reads the input in the following format:
Read the student's name and add structure in to end of the list.
Read program text as integer (if the input is 1, go to step 1 again to read the next student's name and if the input is 0, stop and return the address of the first student of the list of structures of students)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!