Sunday, November 28, 2010

Define the structure called CLASS having properties like stud_id, stud_name and stud_branch. Write a program which takes the details of at least 15

#include
struct CLASS{
char stud_name[20];
int stud_ID[10];
char stud_Branch[20];
};
main()
{
int i,m;
struct CLASS student[15];
printf("How many students details do you want to enter? ");
scanf("%d",&m);
for (i=0;i{
printf("Enter the details of %d student\n",i+1);
printf("Enter the name of student: ");
scanf("%s",student[i].stud_name);

printf("Enter students ID ");
scanf("%d",student[i].stud_ID);

printf("Enter students Branch ");
scanf("%s",student[i].stud_Branch);

}
printf("Thank you\n");
}