To Store multiple student’s details in C we will need a Structure array. Each element in the structure array represents the single student.

Each Structure i.e Student will have:

  • Name
  • Roll
  • Stream

For the demonstration purpose, we will read 2 student’s details, store it in the structure array and finally print it.

C Program to Read and Print Student Details

Output

Student details using structure in C Output-min

To include more students details change the value of n. Also note that the student name should not include any space if you want so, then use gets() instead of scanf for taking input into students[i].name

If you have any doubts or suggestion then comment below.

Leave a Reply

Close Menu