Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

#include<stdio.

h>

struct student{
char fname[50];
char lname[50];
char sno[50];
int age[50];
};

int main(){
struct student stud[10];
int i=0, j=0;
for(i; i<=10; i++){
printf("[%i]First name: ", i);
gets(stud[i].fname);
printf("[%i]Last name: ", i);
gets(stud[i].lname);
printf("[%i]Student Number: ", i);
gets(stud[i].sno);
printf("[%i]Age: ", i);
gets(stud[i].age);
}

for(j; j<=10; j++){


printf("Student %d Information: ", j+1);
printf("\n\tStudent Number: “);
gets(stud[j].sno);
printf("\n\tStudent Name: “);
gets(stud[j].lname);
printf(“, “);
gets(stud[j].fname);
printf("\n\tAge: “);
gets(stud[j].age);
}
}

You might also like