C Programming Questions and Answers:: Structures, Unions, Enums

What will be the output of the program in 16 bit platform (Turbo C under DOS) ? #include int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit; printf("%d\n", sizeof(bit)); return 0; }

A. 1
B. 2
C 4
D. 9

What is the similarity between a structure, union and enumeration?

A. All of them let you define new values
B. All of them let you define new data types
C All of them let you define new pointers
D. All of them let you define new structures

How will you free the allocated memory ?

A. remove(var-name);
B. free(var-name);
C delete(var-name);
D. dalloc(var-name);