Part 1: Multiple-Choice Questions (15 Questions)
Choose the best answer for each question.
1. What is the fundamental definition of a computer program?
a) A type of music file.
b) A set of step-by-step instructions that tell a computer how to perform a specific task.
c) A piece of computer hardware.
d) A special kind of keyboard.
2. What is the primary purpose of a programming language?
a) To help humans talk to each other.
b) To allow humans to write instructions that a computer can understand and execute.
c) To design physical computer chips.
d) To organize files into folders.
3. What is a compiler?
a) A program that helps you draw images.
b) A program that translates code written in a high-level language (like C) into machine code that
the computer can run.
c) A type of storage device.
d) A tool used to edit videos.
4. What is a syntax error in programming?
a) An error that causes the computer to run out of memory.
b) An error that occurs when the code violates the rules or grammar of the programming
language.
c) An error that happens when the program produces the wrong result.
d) An error that causes a computer screen to flash.
5. Which term refers to a named storage location in a computer's memory that holds a value
which can change during the program execution?
a) Constant
b) Operator
c) Variable
d) Data Type
6. Which of the following is an example of a Data Type in programming?
a) Top-Down
b) Modular
c) Integer (or int)
d) Debugging
7. What are Constants in programming?
a) Values that must be entered by the user.
b) Values that are fixed and cannot be changed during the program's execution.
c) Errors that are difficult to find.
d) Special programs used to connect to the Internet.
8. What is the assignment operator commonly used in C programming?
a) == (Double equals)
b) + (Plus sign)
c) \times (Multiplication sign)
d) = (Single equals sign)
9. What is a Logical Error (or bug)?
a) An error that stops the compiler from translating the code.
b) An error caused by the wrong keyboard layout.
c) An error where the program runs but produces an incorrect or unexpected result.
d) An error caused by an unplugged printer.
10. What is Debugging?
a) The process of writing the initial program code.
b) The process of turning off the computer.
c) The process of finding and fixing errors (bugs) in the program code.
d) The process of giving variables a name.
11. Which concept involves breaking down a large, complex programming problem into smaller,
more manageable sub-problems?
a) Machine language
b) Type conversion
c) Top-down design
d) Syntax checking
12. What does Modular Design promote in programming?
a) Writing all the code in one very long section.
b) Dividing the program into separate, self-contained modules or functions.
c) Using only one type of data.
d) Writing code without comments.
13. What is the process of converting a value from one data type to another (e.g., from an integer
to a floating-point number)?
a) Compilation
b) Debugging
c) Type conversion
d) Declaration
14. What is the primary advantage of using a high-level programming language (like C) over a
low-level language?
a) It runs faster without any compilation.
b) It can only perform simple tasks.
c) It is much closer to human language, making it easier to read, write, and understand.
d) It does not require variables.
15. In C programming, what is the purpose of the main() function?
a) It contains all the variable declarations.
b) It is an optional part of the program.
c) It is the entry point where the program execution begins.
d) It is only used for displaying numbers.
Structural Questions (5 Questions)
Answer the following questions briefly.
1. Define a Variable in the context of programming and give a simple example of its declaration
in a language like C.
2. Briefly explain the Top-Down Design approach in programming.
3. What is the main benefit of using Modular Design when developing a large program?
4. What is a C Operator? Give two simple examples and their function.
5. Write a simple C program snippet (including the main function) that would display the two
characters 'H' and 'M' on the computer screen.