What are arrays in C?
a) A collection of elements of the same type
b) A single integer variable
c) A function pointer
d) A control flow statement
Answer:
a) A collection of elements of the same type
Explanation:
Arrays in C are a collection of elements that are of the same data type, stored in contiguous memory locations. Arrays allow you to store multiple values in a single variable, which can be accessed using an index. The index of an array starts from 0 and goes up to the size of the array minus one.
Arrays are fundamental in C for handling lists of data, such as a sequence of numbers or characters. They are particularly useful when dealing with large amounts of data that need to be processed in a loop or accessed in a systematic manner.