wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computational Thinking Quiz

Total questions: 56

Worksheet time: 31mins

Name
Class
Date
1.

Which of the following is the correct definition of computational thinking?

a)

The process of solving problems through memorization

b)

The use of human intuition for solving problems

c)

Using computers and thinking logically to solve problems

d)

Solving problems without any logic

2.

In computational thinking, which of the following involves breaking down a problem into smaller parts?

a)

Abstraction

b)

Decomposition

c)

Generalization

d)

Pattern recognition

3.

In modern computers, data is encoded primarily in which number system?

a)

Decimal

b)

Binary

c)

Hexadecimal

d)

Octal

4.

What is the binary equivalent of the decimal number 10?

a)

1010

b)

1001

c)

1100

d)

1011

5.

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

a)

1variable

b)

variable_name

c)

variable-name

d)

variable name

6.

What keyword is used to define an integer data type in C programming?

a)

float

b)

char

c)

int

d)

double

7.

Which of the following represents the Boolean value for TRUE?

a)

1

b)

0

c)

-1

d)

NULL

8.

What is the result of TRUE AND FALSE in Boolean logic?

a)

TRUE

b)

FALSE

c)

Undefined

d)

TRUE AND FALSE

9.

In algorithmic thinking, which control structure allows for repeating a set of actions?

a)

Sequence

b)

Selection

c)

Repetition

d)

Abstraction

10.

Which type of control structure is used in a conditional statement in C?

a)

Sequence

b)

Selection

c)

Repetition

d)

Variable

11.

What is the main goal of computational thinking?

a)

To solve problems

b)

To create designs

c)

To follow instructions

d)

To memorize data

12.

Which of the following data types is used to store characters in C?

a)

int

b)

float

c)

char

d)

double

13.

Which number system is base-2?

a)

Decimal

b)

Binary

c)

Octal

d)

Hexadecimal

14.

What is 1011 in decimal?

a)

9

b)

10

c)

11

d)

12

15.

The process of breaking down complex problems into simpler parts is known as:

a)

Synthesis

b)

Abstraction

c)

Decomposition

d)

Compression

16.

Which of the following is NOT a keyword in C?

a)

int

b)

char

c)

float

d)

integer

17.

What is the size of int data type in C (assuming 32-bit system)?

a)

1 byte

b)

2 bytes

c)

4 bytes

d)

8 bytes

18.

Which symbol is used to denote comments in C programming?

a)

#

b)

//

c)

;

d)

""

19.

Which of the following is a correct variable declaration in C?

a)

int number;

b)

integer number;

c)

num int;

d)

float integer;

20.

What will the following code print? printf("%d", 5+3);

a)

5

b)

3

c)

8

d)

Error

21.

What is the result of TRUE OR FALSE?

a)

TRUE

b)

FALSE

c)

NULL

d)

Undefined

22.

Which of the following is a Boolean operator?

a)

+

b)

-

c)

AND

d)

/

23.

In Boolean logic, which operator results in TRUE only if both operands are TRUE?

a)

OR

b)

NOT

c)

AND

d)

NOR

24.

What is the result of NOT(TRUE)?

a)

TRUE

b)

FALSE

c)

NULL

d)

Undefined

25.

What is the truth value of TRUE AND TRUE OR FALSE?

a)

TRUE

b)

FALSE

c)

Undefined

d)

Cannot be determined

26.

What is pseudocode?

a)

A coding language

b)

A detailed flowchart

c)

A high-level description of an algorithm

d)

A software development tool

27.

Which symbol in flowcharts represents a decision?

a)

Rectangle

b)

Circle

c)

Diamond

d)

Arrow

28.

In algorithm design, which control structure repeats a set of instructions?

a)

Sequence

b)

Selection

c)

Repetition

d)

Condition

29.

What does the following pseudocode represent? IF age > 18 THEN print "Adult"

a)

Loop

b)

Selection

c)

Repetition

d)

Sequence

30.

Which of the following is a basic control structure in C?

a)

Sequence

b)

Loop

c)

Conditional statement

d)

All of the above

31.

What is the purpose of problem analysis?

a)

To write the code

b)

To define the problem clearly

c)

To find errors in the code

d)

To debug the program

32.

Which C control structure is used for making decisions?

a)

if-else

b)

for

c)

while

d)

do-while

33.

Which of the following statements is correct?

a)

if (x == y) is a comparison operation

b)

if x = y is correct syntax

c)

if x == y compares value of x with 1

d)

if (x y) compares x and y

34.

Which loop in C will execute at least once?

a)

while

b)

for

c)

do-while

d)

None

35.

What will be the output of this code snippet? C int i = 0; while(i

4 lines
36.

What is the purpose of a return statement in a C function?

a)

It exits the program

b)

It exits the function and returns a value

c)

It continues the function

d)

It skips the function

37.

In Boolean logic, which of the following expressions represents an OR operation?

a)

&&

b)

||

c)

==

d)

!=

38.

What is the output of !(TRUE AND FALSE)?

a)

TRUE

b)

FALSE

c)

NULL

d)

Undefined

39.

If the statement p OR q is TRUE, what can we infer about p and q?

a)

Both must be TRUE

b)

At least one is TRUE

c)

Both must be FALSE

d)

Neither is TRUE

40.

In propositional logic, which of the following is equivalent to NOT (p AND q)?

a)

NOT p OR NOT q

b)

NOT p AND q

c)

p AND NOT q

d)

p OR q

41.

Which operator in Boolean logic is used to negate a condition?

a)

AND

b)

OR

c)

NOT

d)

NOR

42.

Given that A = TRUE and B = FALSE, what is the result of A AND B?

a)

TRUE

b)

FALSE

c)

Undefined

d)

NULL

43.

Which flowchart symbol represents an action or process?

a)

Oval

b)

Rectangle

c)

Diamond

d)

Arrow

44.

In algorithm design, which control structure allows for decision-making?

a)

Sequence

b)

Selection

c)

Loop

d)

Variable

45.

What is the purpose of a flowchart in algorithmic design?

a)

To write code

b)

To create a visual representation of the steps

c)

To simplify documentation

d)

To analyze data

46.

Which pseudocode line represents a loop that runs 5 times?

a)

REPEAT 5 TIMES

b)

IF count = 5 THEN

c)

DO UNTIL count > 5

d)

EXIT WHEN count = 5

47.

Which type of control structure is best for situations where actions need to be repeated?

a)

Sequence

b)

Condition

c)

Repetition

d)

Decision

48.

Which flowchart symbol is used to show input or output operations?

a)

Rectangle

b)

Parallelogram

c)

Diamond

d)

Arrow

49.

In C programming, which control structure is used to repeat a block of code until a condition is met?

a)

if

b)

switch

c)

while

d)

goto

50.

Which of the following best describes a well-defined problem?

a)

Ambiguous requirements

b)

Clearly stated inputs, process, and outputs

c)

Vague goal

d)

Undefined outputs

51.

What will the following C code snippet print? int i = 0; do { printf("%d", i); i++; } while(i 0) { printf("Positive"); } else { printf("Non-positive"); }

a)

Checks if x is positive and prints accordingly

b)

Checks if x is negative

c)

Checks if x is zero

d)

Only prints if x is negative

52.

Which of the following best describes abstraction in computational thinking?

a)

Ignoring details that are irrelevant to the problem

b)

Breaking down problems into smaller parts

c)

Solving problems without data

d)

Generalizing a solution

53.

What is the hexadecimal equivalent of the binary number 1010 1111?

a)

6F

b)

AF

c)

B9

d)

CA

54.

How would you represent the decimal number 156 in octal?

a)

234

b)

156

c)

320

d)

1A4

55.

Which number system is base-16?

a)

Decimal

b)

Binary

c)

Octal

d)

Hexadecimal

56.

What is the binary representation of the decimal number 25?

a)

11011

b)

10101

c)

11100

d)

10001