C - Structure and Union
C - Structure and Union
21. Identify the wrong statement.
- Structure variable can be passed as argument.
- Pointter to structure can be passed as argument
- Member variable of a structure can be passed as argument.
- None of the above.
22. Union is
- a special type of structure
- a pointer data type
- a function data type
- not a data type
23. The restriction with union is
- The last member can only be initialized
- The first member can only be initialized.
- Any member can be initialized.
- Union cannot be initialized
24. Union differs from structure in the following way.
- All members are used at a time.
- Only one member can be used at a time.
- Union cannot have more members.
- Union initializes all members as structure.
25. Identify the correct statement.
- Union can be members of structures.
- Structures can be members of unions.
- Both options a and b
- Union can contain bit field.
26. What is not possible with union?
- Array of union
- Pointer to union
- Self-referential union
- None of the above
28. The nodes in a linked list are implemented using
- self-referential structure
- nested structure
- array of structure
- ordinary structure
29. Identify the wrong statement.
- An array is a collection of data items of same data type.
- An array declaration reserves memory space and structure declaration does not reserve memory space.
- Array uses the keyword array in its declaration.
- A structure is a collection of data items of different data types.
30. Identify the wrong statement.
- An array can have bit fields.
- A structure may contain bit fields.
- A structure has declaration and definition.
- A structure variable can be initialized.