Virajsinh

B_PRM_01

Oct 9th, 2017
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. /* Write a Simple Structure Program */
  2.  
  3. #include<stdio.h>
  4. #include<conio.h>
  5.  
  6. struct student
  7. {
  8.     int roll;
  9.     char name[], add[], city[];
  10. };
  11.  
  12.  
  13. void main()
  14. {
  15.     struct student i;
  16.     clrscr();
  17.  
  18.     printf("Ente Roll :");
  19.     scanf("%d", &i.roll);
  20.     printf("Enter Name :");
  21.     scanf("%s",i.name);
  22.     printf("Enter Address :");
  23.     scanf("%s",i.add);
  24.     printf("Enter City :");
  25.     scanf("%s",i.city);
  26.  
  27.     printf("Roll : %d",i.roll);
  28.     printf("Name : %s",i.name);
  29.     printf("Address : %s",i.add);
  30.     printf("City : %s",i.city);
  31.     getch();
  32. }
Add Comment
Please, Sign In to add comment