IB Computer Science SL/HL
Practice Exam Questions And
Correct Answers (Verified
Answers) Plus Rationales
2025/2026 Q&A | Instant
Download Pdf
1. What does a compiler do?
A. Executes code line by line
B. Translates source code into machine code
C. Stores program data
D. Manages memory allocation
Answer: B
Rationale: A compiler converts the entire high-level program
into machine code before execution.
2. Which data structure follows FIFO?
A. Stack
B. Tree
C. Queue
D. Array
,Answer: C
Rationale: A queue follows First In First Out order.
3. What is a primary function of an operating system?
A. Write user programs
B. Manage hardware resources
C. Compile code
D. Design databases
Answer: B
Rationale: The OS manages CPU, memory, and hardware
resources.
4. What is the binary equivalent of decimal 10?
A. 1010
B. 1001
C. 1100
D. 1110
Answer: A
Rationale: 10 in binary is 1010.
5. Which logic gate outputs 1 only when both inputs are 1?
A. OR
B. AND
C. NOT
D. XOR
,Answer: B
Rationale: AND outputs true only if both inputs are true.
6. What is an algorithm?
A. A programming language
B. A hardware component
C. A step-by-step solution to a problem
D. A type of memory
Answer: C
Rationale: An algorithm is a finite set of instructions.
7. Which memory is volatile?
A. ROM
B. SSD
C. RAM
D. Hard disk
Answer: C
Rationale: RAM loses data when power is off.
8. What is a variable?
A. A fixed value
B. A storage location for data
C. A loop structure
D. A compiler tool
Answer: B
Rationale: Variables store values that can change.
, 9. What does CPU stand for?
A. Central Processing Unit
B. Computer Processing Utility
C. Control Program Unit
D. Central Program Utility
Answer: A
Rationale: CPU is the brain of the computer.
10. Which is a high-level language?
A. Assembly
B. Machine code
C. Python
D. Binary
Answer: C
Rationale: Python is human-readable and high-level.
11. What is the purpose of a firewall?
A. Increase CPU speed
B. Prevent unauthorized network access
C. Store files
D. Compile programs
Answer: B
Rationale: Firewalls filter incoming and outgoing network
traffic.
Practice Exam Questions And
Correct Answers (Verified
Answers) Plus Rationales
2025/2026 Q&A | Instant
Download Pdf
1. What does a compiler do?
A. Executes code line by line
B. Translates source code into machine code
C. Stores program data
D. Manages memory allocation
Answer: B
Rationale: A compiler converts the entire high-level program
into machine code before execution.
2. Which data structure follows FIFO?
A. Stack
B. Tree
C. Queue
D. Array
,Answer: C
Rationale: A queue follows First In First Out order.
3. What is a primary function of an operating system?
A. Write user programs
B. Manage hardware resources
C. Compile code
D. Design databases
Answer: B
Rationale: The OS manages CPU, memory, and hardware
resources.
4. What is the binary equivalent of decimal 10?
A. 1010
B. 1001
C. 1100
D. 1110
Answer: A
Rationale: 10 in binary is 1010.
5. Which logic gate outputs 1 only when both inputs are 1?
A. OR
B. AND
C. NOT
D. XOR
,Answer: B
Rationale: AND outputs true only if both inputs are true.
6. What is an algorithm?
A. A programming language
B. A hardware component
C. A step-by-step solution to a problem
D. A type of memory
Answer: C
Rationale: An algorithm is a finite set of instructions.
7. Which memory is volatile?
A. ROM
B. SSD
C. RAM
D. Hard disk
Answer: C
Rationale: RAM loses data when power is off.
8. What is a variable?
A. A fixed value
B. A storage location for data
C. A loop structure
D. A compiler tool
Answer: B
Rationale: Variables store values that can change.
, 9. What does CPU stand for?
A. Central Processing Unit
B. Computer Processing Utility
C. Control Program Unit
D. Central Program Utility
Answer: A
Rationale: CPU is the brain of the computer.
10. Which is a high-level language?
A. Assembly
B. Machine code
C. Python
D. Binary
Answer: C
Rationale: Python is human-readable and high-level.
11. What is the purpose of a firewall?
A. Increase CPU speed
B. Prevent unauthorized network access
C. Store files
D. Compile programs
Answer: B
Rationale: Firewalls filter incoming and outgoing network
traffic.