ACtE05 · Chapter 5Programming & Applications🏛️ Past Licensure QuestionID: 4cb9ef61
Which of the following data structures CANNOT natively store non-homogeneous (heterogeneous) data elements in C?
Which of the following data structures CANNOT natively store non-homogeneous (heterogeneous) data elements in C?
Multiple Choice Options
- A✓ Correct Option
Arrays
- B
Structures / Records
- C
Unions
- D
Void pointers (
void *[])
Detailed Technical Solution & Explanation
In C, an array is strictly defined as a collection of homogeneous data elements (all elements must be of the identical data type and size). Structures and unions can store heterogeneous data types.
Option Analysis:
•
Option A (Arrays): Correct. Arrays only store homogeneous elements.
•
Option B (Structures / Records): Designed specifically to bundle heterogeneous data types together.
•
Option C (Unions): Can store different data types within the same shared memory location.
•
Option D (Void pointers (
void *[])): Can point to heterogeneous elements indirectly.Reference: Mock Test 06NEC Licensure Syllabus