C Programming Quiz(session2)

Quiz
•
Computers
•
10th Grade
•
Medium
Sumithra pm
Used 2+ times
FREE Resource
21 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is the correct syntax for the ternary operator in C?
if ? else :
condition ? true_value : false_value;
? condition : true_value;
if (condition) ? true : false;
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code? int a = 10; if (a > 5) printf("A"); else printf("B");
A
B
Nothing
Error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which loop guarantees at least one execution of the loop body?
for
while
do...while
if
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which control statement is best suited for multiple constant-value selections?
if
else if
switch
while
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will the following code print? int i; for (i = 1; i 0) ? printf("Positive") : printf("Negative");
Positive
Negative
Error
Nothing
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is not a valid keyword in C for control statements?
if
switch
select
else
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The default keyword is used in which control structure?
if
else if
switch
while
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
APCSA Arrays

Quiz
•
9th - 12th Grade
16 questions
Loops Quiz

Quiz
•
9th - 12th Grade
16 questions
Javascript Basics

Quiz
•
9th - 12th Grade
24 questions
C++ Conditionals

Quiz
•
10th Grade
16 questions
Java by Mr Sam

Quiz
•
10th Grade
21 questions
Синтаксис Python

Quiz
•
7th - 11th Grade
18 questions
Control structures

Quiz
•
10th Grade
16 questions
Loops

Quiz
•
5th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade