LogiQuest
Back to References
11

What will be the output of the program?

#include <iostream>
using namespace std;

int main() {
    int arr[3] = {1, 2, 3};
    for (int v : arr) v *= 10;
    cout << arr[0] + arr[2] << endl;
    return 0;
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.