QP-DCM

QP-DCM

24 Qs

quiz-placeholder

Similar activities

LV01 Test 1

LV01 Test 1

KG - University

20 Qs

Christmas Quiz

Christmas Quiz

KG - University

20 Qs

Scientific Data

Scientific Data

KG - University

20 Qs

 Tekie Product Overview

Tekie Product Overview

KG - University

22 Qs

QP-DCM

QP-DCM

Assessment

Quiz

others

Hard

Created by

Rajesh Yelchuri

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?