/*part B:Program 11:
Program to demostrate student structure to read and
display records of n student.
*/
// note:above program is a example of array of structure
#include<stdio.h>
struct student
{
char name[30];
int roll;
float percentage;
};
void main()
{
struct student s[20];
int i,n;
printf("Enter number of student:\n");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("Enter student name:");
scanf("%s",s[i].name);
printf("Enter student roll number:");
scanf("%d",&s[i].roll);
printf("Enter student percentage:");
scanf("%f",&s[i].percentage);
}
printf("\n Student Details:\n");
for(i=0;i<n;i++)
{
printf("\t %s",s[i].name);
printf("\t %d",s[i].roll);
printf("\t %f",s[i].percentage);
printf("\n");
}
}