ACP_U1p1.c

#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(); }

1 Response

Cam i call only structure variable like s1 ?how?

Write a 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.