Search Header Logo

Revision on loops

Authored by pranali naik

Computers

9th - 12th Grade

Used 5+ times

Revision on loops
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator cannot be used with if-else statement?

<=

? :

&&

||

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Predict the output of the following code snippet:

Both values are equal

Incorrect use of the == operator

Values are not equal

No output

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following code snippet:

x = (c >d) ? c : d;

x = (c >d) ? d : c;

x = (c >d) ? c : c;

x = (c >d) ? d : d;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

if ((a > b) && (a > c)), then which of the following statements is true?

a is the largest number.

b is the largest number.

c is the largest number.

b is the smallest number.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following code snippet:

Which of the following statements is correct?

case 1 will be executed.

case 2 will be executed.

default will be executed.

both case 1 and 2 will be executed.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A sequence of statements enclosed between a pair of curly brackets is called

an empty statement

a compound statement

a null statement

a void statement

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which clause is optional in the switch statement?

default

case

switch

none of these

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?