C - Structure and Union Questions and Answers

Take Exam

The topic C – Structure and Union is frequently featured in C programming MCQ sections of campus placements and technical interviews for companies like Infosys, TCS, and Wipro. Understanding how structures and unions store data is vital for efficient memory management in C. This topic strengthens the fundamentals of data organization, helping candidates write optimized and modular code. Practicing C programming questions and answers on Structure and Union will enhance your understanding and help you tackle programming interview challenges effectively.

C - Structure and Union

Showing 10 of 51 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 in 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. C 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
  • struct
  • struc
  • structr
Show Answer Report

5. Structure declaration

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

6. Structure definition

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

7. Identify the wrong syntax

  • typedef struct (member declaration;}
  • struct tag {member declaration; } V1, V2;
  • typedef struct {member declaration;} NAME; NAME V1, V2;
  • typedef struct tag {member declaration;} NAME; NAME V1, V2;
Show Answer Report

8. Identify the wrong syntax.

  • struct tag {member declaration; };
  • struct tag {member declaration; }V1, V2;
  • struct tag {member declaration;}
  • struct tag {member declaration;} V1, V2;
Show Answer Report

9. The operator used to access the structure member is

  • *
  • .
  • []
  • &
Show Answer Report

10. A structure

  • can be read as a single entity
  • cannot be read as a single entiry.
  • can be displayed as a single entity
  • has member variables that cannot be individually read.
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test