QP-DCM

QP-DCM

24 Qs

quiz-placeholder

Similar activities

Ch. 3 Test (EL)

Ch. 3 Test (EL)

5th Grade

20 Qs

24.25 Citizenship Test Questions 31-50

24.25 Citizenship Test Questions 31-50

12th Grade

20 Qs

วิทยาการคำนวณ (Scratch)

วิทยาการคำนวณ (Scratch)

University

20 Qs

QP-LPS

QP-LPS

KG - University

25 Qs

C Programming (Pre test ET Sec B)

C Programming (Pre test ET Sec B)

Professional Development

25 Qs

Prelims for Software

Prelims for Software

KG - University

25 Qs

PF Surprise Quiz-1 (AY 2024-25)

PF Surprise Quiz-1 (AY 2024-25)

KG - University

24 Qs

Economics Review

Economics Review

4th Grade

19 Qs

QP-DCM

QP-DCM

Assessment

Quiz

others

Hard

Created by

Rajesh Yelchuri

FREE Resource

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid if-else statement?
if (x > 0) {} else {}
if (x > 0) {} elseif {}
if else (x > 0) {}
if (x > 0) else {}

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many branches can an if-else statement have?
1
2
3
Unlimited

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used for multiple conditions in C?
if
if-else
if-else-if ladder
switch

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In an if-else-if ladder, how many else-if statements can you have?
Only 1
Only 2
No limit
Exactly 3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? int x = 10; if (x == 10) printf("Ten"); else printf("Not Ten");
Ten
Not Ten
Error
Nothing

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default case in a switch statement?
It executes if none of the cases match
It executes if all cases match
It is mandatory
It is executed first

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can we have a nested if inside an else statement?
Yes
No
Only with loops
Only inside switch

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?