zero_shubham1

shout_out_to_shantanu_i_guess

Jul 11th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. struct student_details{
  4.     int e_num, adm_year, marks[5][5],fees_clear;
  5.     char name[100];
  6. };
  7.  
  8. struct student_details sd[10];
  9.  
  10. void init_student(struct student_details *pt)
  11. {
  12.     printf("Enter name of the student: ");
  13.     gets((*pt).name);
  14.     puts((*pt).name);
  15. }
  16.  
  17. int main()
  18. {
  19.     int i;
  20.     for(i=0; i<10; i++)
  21.         init_student(&sd[i]);
  22.  
  23.     printf("Enter name: ");
  24.     gets(sd[0].name);
  25.     for(i=0; i<10; i++)
  26.         puts(sd[i].name);
  27.  
  28.     return 0;
  29. }
Add Comment
Please, Sign In to add comment