πŸ“Š C++
Q. What is the output of the following code snippet? int arr[3] = {1, 2, 3}; cout << arr[3];
  • (A) 1
  • (B) 2
  • (C) 3
  • (D) Undefined behavior
πŸ’¬ Discuss
βœ… Correct Answer: (D) Undefined behavior

Explanation: Accessing arr[3] is out of bounds and results in undefined behavior.

Explanation by: Rakesh Kumar
Accessing arr[3] is out of bounds and results in undefined behavior.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
96
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rakesh Kumar
Publisher
πŸ“ˆ
80%
Success Rate