Instructions: Choose the best answer for each of the following multiple-choice questions.

1. Which of the following is NOT a type of programming language?
(A) Interpreted
(B) Compiled
(C) Assembly
(D) Natural
2. What is the purpose of a compiler?
(A) To convert human-readable code into machine-readable code
(B) To execute machine-readable code
(C) To detect and fix errors in code
(D) To create documentation for code
3. Which of the following is a benefit of using a high-level programming language?
(A) Increased development speed
(B) Improved code readability
(C) Reduced risk of errors
(D) All of the above
4. What is the difference between a variable and a constant?
(A) A variable can change its value, while a constant cannot.
(B) A constant can change its value, while a variable cannot.
(C) A variable is stored in memory, while a constant is not.
(D) A constant is stored in memory, while a variable is not.
5. Which of the following is a data type?
(A) Integer
(B) String
(C) Float
(D) All of the above
6. What is the purpose of a loop?
(A) To execute a block of code multiple times
(B) To conditionally execute a block of code
(C) To handle errors
(D) To store data
7. Which of the following is NOT a looping structure?
(A) For loop
(B) While loop
(C) Do-while loop
(D) If-else statement
8. What is the difference between a conditional statement and a loop?
(A) A conditional statement executes a block of code based on a condition, while a loop executes a block of code repeatedly.
(B) A loop executes a block of code based on a condition, while a conditional statement executes a block of code repeatedly.
(C) Conditional statements are used to control flow, while loops are used to iterate over data.
(D) Loops are used to control flow, while conditional statements are used to iterate over data.
9. Which of the following is NOT a benefit of using functions?
(A) Increased code reusability
(B) Reduced code complexity
(C) Improved code readability
(D) Increased development time
10. What is the purpose of a parameter?
(A) To store values passed to a function
(B) To return values from a function
(C) To define the type of data a function can handle
(D) To control the execution of a function
Answer Key:
- D
- A
- D
- A
- D
- A
- D
- A
- D
- A