What will be the output of the code after the given code executes? int a = 5;…

PYQ RPSC Programmer 2024

What will be the output of the code after the given code executes? int a = 5; int b = a++; System.out.println("a=" + a + " b=" + b);

  1. A.

    a = 6 b = 5

  2. B.

    a = 5 b = 6

  3. C.

    a = 6 b = 6

  4. D.

    a = 5 b = 5

  5. E.

    Question not attempted

Attempted by 391 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rpsc Programmer

Loading lesson…