ICSE-CLASS-X-BOARD SERIES
Computer-applications

Control Statements

5 previous year questions.

Volume: 5 Ques
Yield: Medium

High-Yield Trend

5
2026

Chapter Questions
5 MCQs

01
PYQ 2026
medium
computer-applications ID: icse-cla

Rewrite the following program segment using a for loop:

Given program segment:

int a = 5, b = 10;
while (b > 0)
{
b -= 2;
}
System.out.println(a * b);

Note: Ensure that the variable remains accessible for the System.out.println statement after the loop terminates.

02
PYQ 2026
medium
computer-applications ID: icse-cla

Give the output of the following program segment and mention how many times the loop is executed.

int K = 1;
do
{
K += 2;
System.out.println(K);
} while (K <= 6);

03
PYQ 2026
medium
computer-applications ID: icse-cla
The following program segment calculates and displays the factorial of a number. [Example: Factorial of 5 is ]
\texttt{int P, n = 5, f = 0;}
\texttt{for (P = n; P>0; P--)}
\texttt{\{}
\texttt{\ \ \ \ f *= P;}
\texttt{\}}
\texttt{System.out.println(f);}
04
PYQ 2026
medium
computer-applications ID: icse-cla
Users must be above 10 years to open a self-operated bank account. Write this logic using a ternary operator and store the result (the eligibility message) in a String variable named \texttt{idStatus and print it.}
05
PYQ 2026
medium
computer-applications ID: icse-cla

Read the if program segment given below:

if (a > b) z = 25; else z = 35;

Which one of the following is the correct conversion of the if segment to ternary?

1

2

3

4