C Programming - Structures, Unions, Enums - Discussion
Discussion Forum : Structures, Unions, Enums - True / False Questions (Q.No. 2)
2.
Nested unions are allowed
Discussion:
2 comments Page 1 of 1.
Vinit said:
1 decade ago
Nested unions are allowed.
Try compiling this code:-
union foo
{
int x;
double y;
union bar
{
char blah[10];
char *blurga;
} bletch;
};
void main()
{
}
Try compiling this code:-
union foo
{
int x;
double y;
union bar
{
char blah[10];
char *blurga;
} bletch;
};
void main()
{
}
Pooja said:
1 decade ago
@Vinit, how the answer work with memory would you like to explain?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers