C++ Programming - Constructors and Destructors - Discussion
Discussion Forum : Constructors and Destructors - General Questions (Q.No. 12)
12.
A union that has no constructor can be initialized with another union of __________ type.
Discussion:
7 comments Page 1 of 1.
Akshay said:
10 years ago
In union, memory allocation take places on the basis of the data that required max size in program.
Other data members share that allocated memory while in class every data member allocated at separate memory.
Other data members share that allocated memory while in class every data member allocated at separate memory.
Vmd said:
1 decade ago
@Priyanka. Union is same as structure. But the only difference is union use same memory location for storage and structure uses different.
Upendra Patel said:
1 decade ago
All the members of the union shares the same memory where as members of structure occupy separate memory.
Mitz said:
10 years ago
How union which have no constructor can be initialized by another union of same type?
Ibm_ki_site_se_maraa said:
1 decade ago
Unions cannot contain class objects that have constructors or destructors.
Shiv said:
1 decade ago
What is same in answer?
Priyanka said:
1 decade ago
What is union?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers