Search Header Logo

Control Structures – Objective Questions

Authored by Dasaradh ram

Engineering

University

Used 2+ times

Control Structures – Objective Questions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a conditional control statement?

for

while

if

goto

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? int x = 10; if (x > 5) printf("Hello"); else printf("World");

Hello

World

HelloWorld

No output

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is used to make decisions in a program?

if

switch

both a and b

while

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a looping statement?

a) if

b) switch

c) for

d) goto

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax of a for loop?

for(initialization; condition; increment)

for(condition; initialization; increment)

for(increment; initialization; condition)

for(condition; increment; initialization)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The while loop is executed —

At least once

Zero or more times

Only once

Until the condition is false

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The do-while loop is executed —

Zero or more times

At least once

Only once

Until an error occurs

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?