Question:What is difference between Structure and Unions? 

Answer i) In structure every member has its own memory whereas in union its members share the same member space. (ii) In structure, it is possible to initialize all the members at the same time which is not possible in case of union. (iii) A structure requires more space than union(for the same type of members). (iv) In union different interpretations of the same memory space are possible which is not so in case of structures. 

+ Report
Total Preview: 908
What is difference between Structure and Unions?
Copyright © 2024. Powered by Intellect Software Ltd