QP-DCM

QP-DCM

24 Qs

quiz-placeholder

Similar activities

K.L.E. Institute of Technology, Hubballi-30.

K.L.E. Institute of Technology, Hubballi-30.

KG - University

24 Qs

PF Surprise Quiz-1 (AY 2024-25)

PF Surprise Quiz-1 (AY 2024-25)

KG - University

24 Qs

CS37 - Selection

CS37 - Selection

KG - University

20 Qs

Byte Bash-2k24

Byte Bash-2k24

KG - University

24 Qs

Test linguaggio C crediti

Test linguaggio C crediti

9th - 12th Grade

20 Qs

First Round

First Round

KG - University

25 Qs

QP-LPS

QP-LPS

KG - University

25 Qs

Prelims for Software

Prelims for Software

KG - University

25 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?