Identify the correct output of the C++ code from the following options…

NVS TGT/PGT 2022

Identify the correct output of the C++ code from the following options assuming all required header files are included. void main() { int N[] = {1, 2, 3, 4}; int *P = N; N[1] += 10; cout << *P << " : "; P++; cout << *P << endl; }

  1. A.

    1 : 12

  2. B.

    1 : 2

  3. C.

    11 : 2

  4. D.

    11 : 12

Attempted by 118 students.

Sign up free to check your answer

Sign up free

Explore the full course: Bpsc

Loading lesson…