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

1. Structure is a

  • scalar data type
  • derived data type
  • both options a and b
  • Primitive data type
Show Answer Report

2. Structure is a data type is which

  • each element must have the same data type.
  • each element must have pointer type only
  • each element may have different data type
  • no element is defined
Show Answer Report

3. provides a facility for user defined data type using

  • pointer
  • function
  • structure
  • array
Show Answer Report

4. The keyword used to represent a structure data type is

  • structure
  • struc
  • struct
  • structr
Show Answer Report

5. Structure declaration

  • describes the prototype
  • creates structure variable
  • defines the structure function
  • is not necessary
Show Answer Report

6. In a structure defination

  • initialization of structure members are possible
  • initialization of array of structures are possible
  • both options a and b
  • initialization of array of structures are not possible
Show Answer Report

7. If one or more members of a structure are pointer to the same structure the structure is known as

  • nested structure
  • invalid structure
  • self-referential structure
  • structured structure
Show Answer Report

8. If one or more members of a structure are other structures, the structure is known as

  • nested structure
  • invalid structure
  • self-referential structure
  • unstructured structure
Show Answer Report

9. What type of structure is created by the following definition ? struct first {.....struct second *s;}; struct second {.....;struct first *f ;};

  • Nested structure
  • Self-referential structure
  • Invalid structure
  • Structured strcture
Show Answer Report

10. The changes made in the members of structure are not available in the calling function if

  • pointer to structure is passed as argument
  • the members other than pointer type are passed as arguments
  • Structure variable is passed as argument
  • both options b and c
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test