WorksheetsComputational Thinking Quiz
Total questions: 56
Worksheet time: 31mins
Which of the following is the correct definition of computational thinking?
The process of solving problems through memorization
The use of human intuition for solving problems
Using computers and thinking logically to solve problems
Solving problems without any logic
In computational thinking, which of the following involves breaking down a problem into smaller parts?
Abstraction
Decomposition
Generalization
Pattern recognition
In modern computers, data is encoded primarily in which number system?
Decimal
Binary
Hexadecimal
Octal
What is the binary equivalent of the decimal number 10?
1010
1001
1100
1011
Which of the following is a valid variable name in C?
1variable
variable_name
variable-name
variable name
What keyword is used to define an integer data type in C programming?
float
char
int
double
Which of the following represents the Boolean value for TRUE?
1
0
-1
NULL
What is the result of TRUE AND FALSE in Boolean logic?
TRUE
FALSE
Undefined
TRUE AND FALSE
In algorithmic thinking, which control structure allows for repeating a set of actions?
Sequence
Selection
Repetition
Abstraction
Which type of control structure is used in a conditional statement in C?
Sequence
Selection
Repetition
Variable
What is the main goal of computational thinking?
To solve problems
To create designs
To follow instructions
To memorize data
Which of the following data types is used to store characters in C?
int
float
char
double
Which number system is base-2?
Decimal
Binary
Octal
Hexadecimal
What is 1011 in decimal?
9
10
11
12
The process of breaking down complex problems into simpler parts is known as:
Synthesis
Abstraction
Decomposition
Compression
Which of the following is NOT a keyword in C?
int
char
float
integer
What is the size of int data type in C (assuming 32-bit system)?
1 byte
2 bytes
4 bytes
8 bytes
Which symbol is used to denote comments in C programming?
#
//
;
""
Which of the following is a correct variable declaration in C?
int number;
integer number;
num int;
float integer;
What will the following code print? printf("%d", 5+3);
5
3
8
Error
What is the result of TRUE OR FALSE?
TRUE
FALSE
NULL
Undefined
Which of the following is a Boolean operator?
+
-
AND
/
In Boolean logic, which operator results in TRUE only if both operands are TRUE?
OR
NOT
AND
NOR
What is the result of NOT(TRUE)?
TRUE
FALSE
NULL
Undefined
What is the truth value of TRUE AND TRUE OR FALSE?
TRUE
FALSE
Undefined
Cannot be determined
What is pseudocode?
A coding language
A detailed flowchart
A high-level description of an algorithm
A software development tool
Which symbol in flowcharts represents a decision?
Rectangle
Circle
Diamond
Arrow
In algorithm design, which control structure repeats a set of instructions?
Sequence
Selection
Repetition
Condition
What does the following pseudocode represent? IF age > 18 THEN print "Adult"
Loop
Selection
Repetition
Sequence
Which of the following is a basic control structure in C?
Sequence
Loop
Conditional statement
All of the above
What is the purpose of problem analysis?
To write the code
To define the problem clearly
To find errors in the code
To debug the program
Which C control structure is used for making decisions?
if-else
for
while
do-while
Which of the following statements is correct?
if (x == y) is a comparison operation
if x = y is correct syntax
if x == y compares value of x with 1
if (x y) compares x and y
Which loop in C will execute at least once?
while
for
do-while
None
What will be the output of this code snippet? C int i = 0; while(i
What is the purpose of a return statement in a C function?
It exits the program
It exits the function and returns a value
It continues the function
It skips the function
In Boolean logic, which of the following expressions represents an OR operation?
&&
||
==
!=
What is the output of !(TRUE AND FALSE)?
TRUE
FALSE
NULL
Undefined
If the statement p OR q is TRUE, what can we infer about p and q?
Both must be TRUE
At least one is TRUE
Both must be FALSE
Neither is TRUE
In propositional logic, which of the following is equivalent to NOT (p AND q)?
NOT p OR NOT q
NOT p AND q
p AND NOT q
p OR q
Which operator in Boolean logic is used to negate a condition?
AND
OR
NOT
NOR
Given that A = TRUE and B = FALSE, what is the result of A AND B?
TRUE
FALSE
Undefined
NULL
Which flowchart symbol represents an action or process?
Oval
Rectangle
Diamond
Arrow
In algorithm design, which control structure allows for decision-making?
Sequence
Selection
Loop
Variable
What is the purpose of a flowchart in algorithmic design?
To write code
To create a visual representation of the steps
To simplify documentation
To analyze data
Which pseudocode line represents a loop that runs 5 times?
REPEAT 5 TIMES
IF count = 5 THEN
DO UNTIL count > 5
EXIT WHEN count = 5
Which type of control structure is best for situations where actions need to be repeated?
Sequence
Condition
Repetition
Decision
Which flowchart symbol is used to show input or output operations?
Rectangle
Parallelogram
Diamond
Arrow
In C programming, which control structure is used to repeat a block of code until a condition is met?
if
switch
while
goto
Which of the following best describes a well-defined problem?
Ambiguous requirements
Clearly stated inputs, process, and outputs
Vague goal
Undefined outputs
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"); }
Checks if x is positive and prints accordingly
Checks if x is negative
Checks if x is zero
Only prints if x is negative
Which of the following best describes abstraction in computational thinking?
Ignoring details that are irrelevant to the problem
Breaking down problems into smaller parts
Solving problems without data
Generalizing a solution
What is the hexadecimal equivalent of the binary number 1010 1111?
6F
AF
B9
CA
How would you represent the decimal number 156 in octal?
234
156
320
1A4
Which number system is base-16?
Decimal
Binary
Octal
Hexadecimal
What is the binary representation of the decimal number 25?
11011
10101
11100
10001
