C - Structure and Union Questions and Answers
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
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.
3. C provides a facility for user defined data type using
- pointer
- function
- structure
- array
4. The keyword used to represent a structure data type is
- structure
- struct
- struc
- structr
5. Structure declaration
- describes the prototype
- create structure variable
- defines the structure function
- is not necessary
6. Structure definition
- describes the prototype
- creates structure variable
- defines the structure function
- is not necessary
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;
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;
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.