ICAS Programming and Digital Systems 4 — Questions and Answers
Question 1: What is the function of a CPU (Central Processing Unit)?
- Store long-term data
- Display graphics on screen
- Process instructions and perform calculations (Correct answer)
- Connect to the internet
Correct answer: Process instructions and perform calculations
The CPU is the primary component that executes program instructions and performs arithmetic and logic operations.
Question 2: Which of the following is a characteristic of a 'for' loop?
- It runs until a boolean becomes false
- It iterates a specific number of times (Correct answer)
- It always runs at least once
- It cannot be nested
Correct answer: It iterates a specific number of times
A for loop is typically used when the number of iterations is known in advance, controlled by a counter variable.
Question 3: What is the hexadecimal equivalent of the decimal number 16?
- F
- 10 (Correct answer)
- 1A
- G
Correct answer: 10
Decimal 16 equals hexadecimal 10, because hex 10 means 1×16 + 0 = 16.
Question 4: In networking, what does 'IP address' stand for?
- Internal Protocol address
- Internet Protocol address (Correct answer)
- Input Process address
- Integrated Port address
Correct answer: Internet Protocol address
IP stands for Internet Protocol, and an IP address uniquely identifies a device on a network.
Question 5: What is a function in programming?
- A type of variable
- A reusable block of code that performs a specific task (Correct answer)
- A hardware component
- A type of data structure
Correct answer: A reusable block of code that performs a specific task
A function is a named, reusable block of code designed to perform a particular task when called.
Question 6: Which storage type retains data even when the computer is turned off?
- RAM
- Cache memory
- CPU registers
- Hard disk drive (Correct answer)
Correct answer: Hard disk drive
A hard disk drive (HDD) is non-volatile storage, meaning it retains data permanently without power.
Question 7: What does the logical operator 'AND' return when both inputs are false?
- True
- False (Correct answer)
- Null
- Error
Correct answer: False
The AND operator only returns True when BOTH inputs are True; it returns False in all other cases.
What is the function of a CPU (Central Processing Unit)?