What is the difference between struct and union in C?
Answer Posted / hrpynux@gmail.com
A struct is a block of memory that stores several data objects, where those objects don't overlap. A union is a block of memory that stores several data objects, but has only storage for the largest of these, and thus can only store one of the data objects at any one time.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
where are auto variables stored? What are the characteristics of an auto variable?
Write a program to print “hello world” without using semicolon?
What is the function of multilevel pointer in c?
What is the return type of sizeof?
What is c language and why we use it?
Is javascript written in c?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Difference between constant pointer and pointer to a constant.
Explain how do you override a defined macro?
By using C language input a date into it and if it is right?
What are the different categories of functions in c?
Explain what is the difference between far and near ?
What is data structure in c programming?
Explain what is the difference between null and nul?
What is return type in c?