C - Structure and Union Questions and Answers

Practice Mode
Showing 10 of 51 questions
Q21
Identify the wrong statement.
  • A Structure variable can be passed as argument.
  • B Pointter to structure can be passed as argument
  • C Member variable of a structure can be passed as argument.
  • D None of the above.
Answer: Option D
Q22
Union is
  • A a special type of structure
  • B a pointer data type
  • C a function data type
  • D not a data type
Answer: Option A
Q23
The restriction with union is
  • A The last member can only be initialized
  • B The first member can only be initialized.
  • C Any member can be initialized.
  • D Union cannot be initialized
Answer: Option B
Q24
Union differs from structure in the following way.
  • A All members are used at a time.
  • B Only one member can be used at a time.
  • C Union cannot have more members.
  • D Union initializes all members as structure.
Answer: Option B
Q25
Identify the correct statement.
  • A Union can be members of structures.
  • B Structures can be members of unions.
  • C Both options a and b
  • D Union can contain bit field.
Answer: Option C
Q26
What is not possible with union?
  • A Array of union
  • B Pointer to union
  • C Self-referential union
  • D None of the above
Answer: Option D
Q27
Structure is used to implement the data structure.
  • A stack
  • B queue
  • C tree
  • D all the above
Answer: Option D
Q28
The nodes in a linked list are implemented using
  • A self-referential structure
  • B nested structure
  • C array of structure
  • D ordinary structure
Answer: Option A
Q29
Identify the wrong statement.
  • A An array is a collection of data items of same data type.
  • B An array declaration reserves memory space and structure declaration does not reserve memory space.
  • C Array uses the keyword array in its declaration.
  • D A structure is a collection of data items of different data types.
Answer: Option C
Q30
Identify the wrong statement.
  • A An array can have bit fields.
  • B A structure may contain bit fields.
  • C A structure has declaration and definition.
  • D A structure variable can be initialized.
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test