C Programming-Structure and Union Questions and Answers

Practice Mode
Showing 10 of 29 questions
Q11
The changes made in the members of a structure are available in the calling function if
  • A pointer to structure is passed as argument
  • B structure variable is passed
  • C the members other than pointer type are passed as arguments
  • D both options a and c
Answer: Option A
Q12
Identify the wrong statement.
  • A Structure variable can be passed as argument
  • B Pointer 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
Q13
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
Q14
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
Q15
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 ass members as structure
Answer: Option B
Q16
Identify the correct statement
  • A Unions 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
Q17
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
Q18
Structure is used to implement the data structure.
  • A stack
  • B queue
  • C tree
  • D all the above
Answer: Option D
Q19
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
Q20
Identify the wrong statement.
  • A An array is a collection of data items of same data type.
  • B An arrry declaration reserves memory space and structure declaration does no reserve memory space.
  • C Array uses the key word array in its doclaration.
  • D A structure is a collection of data items of different data types
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test