Skip to content

Computer Science · Class 11 · ISC

Conditional Constructs

The if, if-else and nested if-else statements, the switch-case statement, and the fall-through.

5questions

Board PYQs
0
Practice
5
Topics
0
  • Most common: 3 marks

Syllabus mapping: ISC syllabus (CISCE) (opens CISCE's website in a new tab)

5 questions

  • Practice question

    3 marks

    State three differences between the if-else construct and the switch-case construct.

    Conditional ConstructsMediumShort answer

  • Practice question

    3 marks

    Write a Java program segment using a switch to print the name of the day for a number from 1 to 7.

    Conditional ConstructsMediumApplication based

  • Practice question

    3 marks

    Write a Java program segment that reads an integer and prints whether it is positive, negative or zero.

    Conditional ConstructsMediumApplication based

  • Practice question

    3 marks

    What is the output of the following, and why? int x = 2; switch (x) { case 1: System.out.print("A"); case 2: System.out.print("B"); case 3: System.out.print("C"); }

    Conditional ConstructsMediumNumerical

  • Practice question

    3 marks

    Write a Java program segment that reads three numbers and prints the largest.

    Conditional ConstructsMediumApplication based