What is the output of following C++ programming language code? int main() {…

SSC Scientific Assistant 2022

What is the output of following C++ programming language code? int main() { int array[] = {-5, 10, -15,20}; cout << -array[1]; return 0; }

  1. A.

    -5

  2. B.

    Garbage value

  3. C.

    Error

  4. D.

    -10

Attempted by 387 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…