Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C Programming
»
Structures, Unions, Enums
Point out the error in the program in 16-bit platform? #include
int main() { struct bits { int i:40; }bit; printf("%d\n", sizeof(bit)); return 0; }
4
2
Error: Bit field too large
Error: Invalid member access in structure
Correct Answer:
Error: Bit field too large
← Previous Question
Next Question→
More Questions from
Structures, Unions, Enums
Nested unions are allowed
A structure can be nested inside another structure.
Union elements can be of different sizes.
The '->' operator can be used to access structures elements using a pointer to a structure variable only
Which of the following statement is True?
The '.' operator can be used access structure elements using a structure variable.
A union cannot be nested in a structure
Bit fields CANNOT be used in union.
one of elements of a structure can be a pointer to the same structure.
A structure can contain similar or dissimilar elements
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments