Q. What is the output of the following code snippet? int arr[3] = {1, 2, 3}; cout << arr[3];
β
Correct Answer: (D)
Undefined behavior
Explanation: Accessing arr[3] is out of bounds and results in undefined behavior.