Code:
#include<stdio.h>
int main()
{
struct address
{
char phone[15];
char city[25];
int pin;
};
struct emp
{
char name[25];
struct address a;
};
struct emp e = {"jeru", "512455", "nagpur", 10};
printf(" %s %s\n", e.name, e.a.phone);
printf(" %s %d\n", e.a.city, e.a.pin);
return 0;
}
In the above program how the below statement occur:
Is that declared there ?
And my compiler gives two warning :
Code:
gcc -Wall -o "untitled5" "untitled5.c" (in directory: /home/duh/Desktop/C)
untitled5.c: In function ‘main’:
untitled5.c:15:9: warning: missing braces around initializer [-Wmissing-braces]
untitled5.c:15:9: warning: (near initialization for ‘e.a’) [-Wmissing-braces]
Compilation finished successfully.