#include<stdio.h> typedef union { struct accname { char sbi[20]; char canara[20]; char hdfc[20]; char icici[20]; }; } unionv; void main() { unionv var1; struct accname var2; printf("sizeof union=%d\n",sizeof(var1)); printf("sizeof str=%d\n",sizeof(var2)); }
A warning is displayed here.
warning: declaration does not declare anything [enabled by default] }unionv
Can anyone understand why he is warning?
source share