What is the output of the following code? public class Demo { public static…

PYQ RPSC Programmer 2024

What is the output of the following code? public class Demo { public static void main(String[] args) { int x = 5; System.out.println(++x * 2); } }

  1. A.

    12

  2. B.

    11

  3. C.

    10

  4. D.

    Compile time error

  5. E.

    Question not attempted

Attempted by 601 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rpsc Programmer

Loading lesson…