#include<stdio.h>
#include<conio.h>
struct state
{
char s_name[20];
int n_district,n_pop;
};
void main()
{
struct state s1;
clrscr();
printf("enter the state name:");
scanf("%s",&s1.s_name);
printf("enter district :");
scanf("%d",&s1.n_district);
printf("enter population:");
scanf("%d",&s1.n_pop);
printf("state=%s\n",s1.s_name);
printf("district=%d\n",s1.n_district);
printf("population=%d",s1.n_pop);
getch();
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.