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
11. A structure can have
- pointers as its members
- scalar data type as its members
- structure as its members
- al the above
12. The structure declaration struct person {char name [20]; the int age; struct person woman;};
- is a valid nested structure
- is not a valid nested structure
- uses an invalid data type
- is a self-referential structure
13. A structure
- allows arrray of structure
- does not allow array of structures
- does not use array as its members
- is a scalar data type
14. In a structure definition,
- 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
16. If one or more members of a structure are pointers to the same structute, the structute is known as
- nested structure
- invalid structure
- self-referential structure
- structured structure
17. 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
18. What type of structure is created by the folowing definition ? struct first {... ; struct second *s;}; struct second {... ; struct first *f;};
- Nested structure
- Self-referential structure
- invalid structure
- Structured structure
19. The changes made in the members of a 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
20. The changes made in the members of a structure ae 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