-
Notifications
You must be signed in to change notification settings - Fork 0
/
Info.c
43 lines (43 loc) · 942 Bytes
/
Info.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<stdio.h>
#include<string.h>
#include<conio.h>
struct ad
{int s;
char b[15];
char c[15];
};
struct de
{ int roll;
char n[20];
struct ad add;
}p[50];
void main()
{int n,i;
clrscr();
printf("How many enteries:");
scanf("%d",&n);
for(i=0;i<n;i++)
{printf("Enter roll no.:");
scanf("%d",&p[i].roll);
printf("Enter name:");
scanf("%s",&p[i].n);
printf("Enter street no.:");
scanf("%d",&p[i].add.s);
printf("Enter block:");
scanf("%s",&p[i].add.b);
printf("Enter city:");
scanf("%s",&p[i].add.c);
printf("\n");
}
printf("***************************************************************\n");
printf("Details are as follows:-\n");
for(i=0;i<n;i++)
{printf("Enter roll no.:%d\n",p[i].roll);
printf("Enter name:%s\n",p[i].n);
printf("Enter street no.:%d\n",p[i].add.s);
printf("Enter block:%s\n",p[i].add.b);
printf("Enter city:%s\n",p[i].add.c);
printf("\n");
}
getch();
}