Font size
WorksheetsC-QUEST QUIZ BEE
Total questions: 20
Worksheet time: 9mins
Is a decimal number data type that has single precision
int
float
char
double
Which operator is used to assign a value to a variable?
(a)
What is the size of a char data type in C (in bytes)
1
2
3
4
Which of the following is a valid variable name in C?
2jabel
jabel_pogi
value#
int
Which of the following is a logical operator?
+
&&
=
?
What is the result of 10%3?
(a)
Which of the following can be used to compare two values?
=
==
&&
++
How many times will the following loop run? for(int i = 0; i < 5; i++)
4
5
6
infinite
What is the correct syntax for a for loop in C?
for(initialization; condition; increment)
for(condition; initialization; increment)
for(increment; condition; initialization)
for(condition)
Which of the following can be used to exit a loop immediately
continue
break
return
exit
What does the if statement do?
Repeats a block of code
Tests a condition
Declares a variable
Ends a program
Which keyword is used to declare a constant variable?
const
var
let
constant
What will the following code output?
int x = 3; if (x != 2) { printf("True"); } else { printf("False"); }
True
False
Error
Nothing
Which operator is used to check if two values are not equal?
!=
=!
!!
/=
Who is our speaker for today's workshop?
(Full Name ex. Juan T. Tamad)
(a)
Who is our speaker for today's workshop?
(Full Name ex. Juan T. Tamad)
(a)
What is the output of the following code?
int x = 5; printf("%d", x++);
5
6
0
Error
What is the correct data type for storing a whole number in C?
float
double
int
char
What is the output of the following C program?
int main() { int n = 5; unsigned long long fact = 1; for(int i = 1; i <= n; ++i) { fact *= i; } printf("Factorial of %d = %llu", n, fact); return 0; }
120
24
720
1
They can be viewed as the names given to the memory location so that we can refer to it without having to memorize the memory address.
Container
Variable
Memory Allocation
