C Programming Quiz

C Programming Quiz

12th Grade

51 Qs

quiz-placeholder

Similar activities

ICT EASY EXAM

ICT EASY EXAM

11th - 12th Grade

50 Qs

Python Quiz 4

Python Quiz 4

9th - 12th Grade

50 Qs

Computer Math Final 2021

Computer Math Final 2021

9th - 12th Grade

55 Qs

Computer Science Multiple Choice Review

Computer Science Multiple Choice Review

9th - 12th Grade

50 Qs

PLTW CSE Essentials Review

PLTW CSE Essentials Review

8th - 12th Grade

50 Qs

Ulangkaji ASK Ting 2 Bab 3.1 Persekitaran Kod Arahan

Ulangkaji ASK Ting 2 Bab 3.1 Persekitaran Kod Arahan

1st - 12th Grade

52 Qs

SP- Level 2

SP- Level 2

5th Grade - Professional Development

50 Qs

CSP Vocabulary Review

CSP Vocabulary Review

9th - 12th Grade

53 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Dr. PRASAN

FREE Resource

51 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct syntax for an if statement in C?

if condition then statement;

if (condition) statement;

if condition statement;

if {condition} statement;

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The if-else statement in C is used for:

Repeating a set of statements

Branching between two alternatives

Comparing two loops

Declaring variables

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In a nested if statement, the innermost if is executed:

Only if the outer if condition is false

Always, regardless of the outer condition

Only if the outer if condition is true

None of the above

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct syntax for an if-else-if ladder?

if (condition) {...} else if (condition) {...} else {...}

if (condition): else if (condition): else:

if (condition) {else if (condition); else;}

if (condition); else if (condition); else;

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In a switch statement, which keyword is used to exit from a case?

exit

stop

break

return

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following cannot be used as a condition in a switch statement?

int

char

float

enum

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If none of the cases match in a switch statement, which block is executed?

First case

Last case

default

else

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?