wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

C-QUEST QUIZ BEE

Total questions: 20

Worksheet time: 9mins

Name
Class
Date
1.

Is a decimal number data type that has single precision

a)

int

b)

float

c)

char

d)

double

2.

Which operator is used to assign a value to a variable?

(a)  

3.

What is the size of a char data type in C (in bytes)

a)

1

b)

2

c)

3

d)

4

4.

Which of the following is a valid variable name in C?

a)

2jabel

b)

jabel_pogi

c)

value#

d)

int

5.

Which of the following is a logical operator?

a)

+

b)

&&

c)

=

d)

?

6.

What is the result of 10%3?

(a)  

7.

Which of the following can be used to compare two values?

a)

=

b)

==

c)

&&

d)

++

8.

How many times will the following loop run? for(int i = 0; i < 5; i++)

a)

4

b)

5

c)

6

d)

infinite

9.

What is the correct syntax for a for loop in C?

a)

for(initialization; condition; increment)

b)

for(condition; initialization; increment)

c)

for(increment; condition; initialization)

d)

for(condition)

10.

Which of the following can be used to exit a loop immediately

a)

continue

b)

break

c)

return

d)

exit

11.

What does the if statement do?

a)

Repeats a block of code

b)

Tests a condition

c)

Declares a variable

d)
  • Ends a program

12.

Which keyword is used to declare a constant variable?

a)

const

b)

var

c)

let

d)

constant

13.

What will the following code output?
int x = 3; if (x != 2) { printf("True"); } else { printf("False"); }

a)

True

b)

False

c)

Error

d)

Nothing

14.

Which operator is used to check if two values are not equal?

a)

!=

b)

=!

c)

!!

d)

/=

15.

Who is our speaker for today's workshop?

(Full Name ex. Juan T. Tamad)

(a)  

16.

Who is our speaker for today's workshop?

(Full Name ex. Juan T. Tamad)

(a)  

17.

What is the output of the following code?
int x = 5; printf("%d", x++);

a)

5

b)

6

c)

0

d)

Error

18.

What is the correct data type for storing a whole number in C?

a)

float

b)

double

c)

int

d)

char

19.

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; }

a)

120

b)

24

c)

720

d)

1

20.

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.

a)

Container

b)

Variable

c)

Memory Allocation