MCQOPTIONS
Bookmark
Saved Bookmarks
→
C Programming
→
Floating Point Issues in C Programming
→
Is it necessary that the size of all elements in a..
1.
Is it necessary that the size of all elements in a union should be same?
A.
Yes
B.
No
Answer» C.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
Point out the error in the program? #include<stdio.h> int main() { union a { int i; char ch[2]; }; union a z1 = {512}; union a z2 = {0, 2}; return 0; }
Point out the error in the program? #include<stdio.h> int main() { struct emp { char n[20]; int age; }; struct emp e1 = {"Dravid", 23}; struct emp e2 = e1; if(e1 == e2) printf("The structure are equal"); return 0; }
Point out the error in the program? #include<stdio.h> int main() { struct bits { float f:2; }bit; printf("%d\n", sizeof(bit)); return 0; }
Is it necessary that the size of all elements in a union should be same?
What will be the output of the program in Turbo C (under DOS)? #include<stdio.h> int main() { struct emp { char *n; int age; }; struct emp e1 = {"Dravid", 23}; struct emp e2 = e1; strupr(e2.n); printf("%s\n", e1.n); return 0; }
The '.' operator can be used access structure elements using a structure variable.
Will the following declaration work? typedef struct s { int a; float b; }s;
If a char is 1 byte wide, an integer is 2 bytes wide and a long integer is 4 bytes wide then will the following structure always occupy 7 bytes? struct ex { char ch; int i; long int a; };
What will be the output of the program given below in 16-bit platform ? #include<stdio.h> int main() { enum value{VAL1=0, VAL2, VAL3, VAL4, VAL5} var; printf("%d\n", sizeof(var)); return 0; }
A structure can contain similar or dissimilar elements
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply