LIST OF PROGRAMS
#include<stdio.h>
#include<conio.h>
struct book
{
char student[20];
int marks[5];
}s2[5];
void main()
{ int i,j;
clrscr();
for(j=0;j<5;j++)
{
printf("\nENTER DETAILS OF %d STUDENT: ",j+1);
printf("\nENTER STUDENT NAME");
fflush(stdin);
gets(s2[j].student);
for(i=0;i<3;i++)
{printf("\nENTER MARKS IN %d SUBJECT ",i+1);
scanf("%d",&s2[j].marks[i]);
}
}
for(j=0;j<5;j++)
{
printf("DETAILS OF %d STUDENT ARE : ",j+1);
printf("\nSTUDENT NAME ");
puts(s2[j].student);
for(i=0;i<3;i++)
{
printf("\n MARKS IN %d SUBJECT ",i+1);
printf("%d",s2[j].marks[i]);
}
}
getch();
}
Comments