A
Q. What is an array?
- Correct Answer - Option(B)
- Views: 36
- Filed under category C Programming
- Hashtags:
A
In C language, an array is:
A collection of elements (variables), all of the same data type, stored in contiguous memory locations, and accessed using an index.
Example:
int numbers[5] = {1, 2, 3, 4, 5};
Evaluating the Options:
| Option | Explanation | Correct? |
|---|---|---|
| (A) Collection of dissimilar data types | ❌ Incorrect – that would describe a structure (struct) | |
| (B) Collection of same data type | ✅ Correct | |
| (C) Not a collection of same data type | ❌ Incorrect | |
| (D) None of the above | ❌ Incorrect |
Final Answer: (B) An array is a collection of variables that are of the same data type. ✅
You must be Logged in to update hint/solution
Be the first to start discuss.
Discusssion
Login to discuss.