Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Write a program using structures to read and display
- information about a student using typedef. */
- #include<stdio.h>
- #include<conio.h>
- typedef struct student
- {
- int roll;
- char name[15], add[15], city[15];
- }stud;
- void main()
- {
- stud i;
- clrscr();
- printf("Ente Roll :");
- scanf("%d", &i.roll);
- printf("Enter Name :");
- scanf("%s",i.name);
- printf("Enter Address :");
- scanf("%s",i.add);
- printf("Enter City :");
- scanf("%s",i.city);
- printf("\n Roll : %d",i.roll);
- printf("\n Name : %s",i.name);
- printf("\n Address : %s",i.add);
- printf("\n City : %s",i.city);
- getch();
- }
Add Comment
Please, Sign In to add comment