C Programming-Structure and Union Questions and Answers

Take Exam

C Programming Structure and Union questions with answers cover one of the most crucial topics in C. These programming questions and answers help learners differentiate between structures and unions, focusing on memory allocation, data sharing, and initialization techniques. Practicing C programming MCQ and programming interview questions with answers strengthens conceptual clarity required in technical interviews for companies like TCS, Infosys, and Accenture. Understanding how structures and unions store data enables developers to design efficient C programs, making this topic a vital part of C aptitude and placement preparation.

C Programming-Structure and Union

Showing 10 of 29 questions

11. The changes made in the members of a structure are available in the calling function if

  • pointer to structure is passed as argument
  • structure variable is passed
  • the members other than pointer type are passed as arguments
  • both options a and c
Show Answer Report

12. Identify the wrong statement.

  • Structure variable can be passed as argument
  • Pointer to structure can be passed as argument
  • Member variable of a structure can be passed as argument
  • None of the above
Show Answer Report

13. Union is

  • A special type of structure
  • a pointer data type
  • a function data type
  • not a data type
Show Answer Report

14. 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 Report

15. 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 ass members as structure
Show Answer Report

16. Identify the correct statement

  • Unions can be members of structures.
  • Structures can be members of unions.
  • Both options a and b
  • Union can contain bit field
Show Answer Report

17. What is not possible with union ?

  • Array of union
  • Pointer to union
  • Self-referential union
  • None of the above
Show Answer Report

18. Structure is used to implement the data structure.

  • stack
  • queue
  • tree
  • all the above
Show Answer Report

19. The nodes in a linked list are implemented using

  • self-referential structure
  • nested structure
  • array of structure
  • ordinary structure
Show Answer Report

20. Identify the wrong statement.

  • An array is a collection of data items of same data type.
  • An arrry declaration reserves memory space and structure declaration does no reserve memory space.
  • Array uses the key word array in its doclaration.
  • A structure is a collection of data items of different data types
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test