//Create array as a variable of structure
#include<stdio.h>
struct student
{
char name[20];
int rollno;
float marks;
}s[3];
int main()
{
for(int i=0;i<3;i++)
{
printf("Enter Name of student %d=",i+1);
scanf("%s",s[i].name);
printf("Enter the roll no of student %d=",i+1);
scanf("%d",&s[i].rollno);
printf("Enter the marks of student %d=",i+1);
scanf("%f",&s[i].marks);
}
for(int i=0;i<3;i++)
{printf("\nHere is the detail of student %d------>\n",i+1);
printf("Name=%s\nRollNo=%d\nMarks=%f\n",s[i].name,
s[i].rollno,s[i].marks);}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: