Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- struct student_details{
- int e_num, adm_year, marks[5][5],fees_clear;
- char name[100];
- };
- struct student_details sd[10];
- void init_student(struct student_details *pt)
- {
- printf("Enter name of the student: ");
- gets((*pt).name);
- puts((*pt).name);
- }
- int main()
- {
- int i;
- for(i=0; i<10; i++)
- init_student(&sd[i]);
- printf("Enter name: ");
- gets(sd[0].name);
- for(i=0; i<10; i++)
- puts(sd[i].name);
- return 0;
- }
Add Comment
Please, Sign In to add comment