C++ Arrays Quiz - Question 3

Last Updated :
Discuss
Comments

What will be the output of the following code?

C++
#include <iostream> using namespace std;  int main() {     int arr[5] = {1, 2, 3, 4, 5};     cout << arr[2];     return 0; } 

1

2

3

4

Share your thoughts in the comments
Article Tags :