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.
Show Answer
22. Union is
  • a special type of structure
  • a pointer data type
  • a function data type
  • not a data type
Show Answer
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
Show Answer
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.
Show Answer
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.
Show Answer
26. What is not possible with union?
  • Array of union
  • Pointer to union
  • Self-referential union
  • None of the above
Show Answer
27. Structure is used to implement the data structure.
  • stack
  • queue
  • tree
  • all the above
Show Answer
28. The nodes in a linked list are implemented using
  • self-referential structure
  • nested structure
  • array of structure
  • ordinary structure
Show Answer
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.
Show Answer
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.
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test