Correct Answer - Option 4 : AWbWhat the heckW
Explanation:
- An array is defined as the collection of similar types of data items stored at contiguous memory locations. Arrays are the derived data type in C programming language that can store the primitive type of data such as int, char, double, float, etc.
- It also can store the collection of derived data types, such as pointers, structure, etc. The array is the simplest data structure where each data element can be randomly accessed by using its index number.
- C array is beneficial if you have to store similar elements.
By using the array, we can access the elements easily. Only a few lines of code are required to access the elements of the array.
The syntax is shown below:
data_type array_name[array_size];
Analysis:
In the first print whole string is printed.
In the second print function, the third element is accessed. The array starts with ‘0’, so the third element is W.
The final output is:
AWbWhat the heckW
Conclusion:
Option 4 is correct.