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