Computers

9th -

12thgrade

Image

Java Loops

617
plays

12 questions

Show Answers
See Preview
  • 1. Multiple Choice
    30 seconds
    1 pt

    What will the output of the following code segment be?


    int a = 1, b = 2;

    System.out.println(++a+”,”+b++);

    1,2

    2,2

    2,3

    3,3

  • 2. Multiple Choice
    30 seconds
    1 pt

    What will the following program segment display?


    for(int a = 2; a <= 10; a += 3)

    System.out.print(a+””);

    2 5 8

    2 5

    2 5 8 11

    2

  • 3. Multiple Choice
    30 seconds
    1 pt

    In the expression number++, the ++ operator is in what mode?

    prefix

    pretest

    postfix

    posttest

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?