
C Programming Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
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
Similar Resources on Wayground
50 questions
I CS Quiz 25/9 final

Quiz
•
12th Grade - University
50 questions
COMPUTING 2ND TERM 3rd EDITION

Quiz
•
12th Grade
47 questions
Python Programming Quiz

Quiz
•
12th Grade
50 questions
Soal Informatika XII - Ganjil 2024

Quiz
•
12th Grade - University
50 questions
Programming with Karel Review

Quiz
•
9th - 12th Grade
50 questions
Tryout Bag. 3.1

Quiz
•
9th - 12th Grade
50 questions
C Programming Quiz

Quiz
•
12th Grade
50 questions
ULANGAN HARIAN TEKNIK PENGOLAHAN AUDIO DAN VIDEO

Quiz
•
1st - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade