1. What is the function of a compiler?
A. To interpret code line by line
B. To convert high-level code into machine code
C. To run the program directly from the source code
D. To manage memory during program execution
Answer: B) To convert high-level code into machine code
Rationale: A compiler translates high-level source code into machine
code or an intermediate code that can be executed by the computer.
2. Which of the following is true about the TCP/IP model?
A. It has 7 layers like the OSI model
B. It is used exclusively for wireless communication
C. It is a four-layer model
D. It requires a physical medium for communication
Answer: C) It is a four-layer model
Rationale: The TCP/IP model is a simplified, four-layer model used in
networking, contrasting with the OSI model which has seven layers.
3. Which of the following is an example of a hardware interrupt?
A. Software exception
,B. A signal from a keyboard when a key is pressed
C. A system call to read from a file
D. An error in a program
Answer: B) A signal from a keyboard when a key is pressed
Rationale: A hardware interrupt occurs when an external device, such
as a keyboard or mouse, sends a signal to the CPU to gain attention.
4. What is the main benefit of using version control systems like Git?
A. It reduces the cost of development
B. It allows multiple developers to work on the same project
simultaneously
C. It automates the testing process
D. It improves the speed of development
Answer: B) It allows multiple developers to work on the same project
simultaneously
Rationale: Version control systems like Git allow developers to
collaborate on the same codebase, track changes, and manage different
versions of the project efficiently.
5. Which of the following algorithms is used to find the shortest path in
a graph?
A. Merge Sort
B. Dijkstra’s Algorithm
, C. Bubble Sort
D. Breadth-First Search
Answer: B) Dijkstra’s Algorithm
Rationale: Dijkstra’s Algorithm is used to find the shortest path
between nodes in a graph, particularly in weighted graphs.
6. What does DNS stand for in networking?
A. Digital Network System
B. Domain Name System
C. Dynamic Network Security
D. Direct Network Service
Answer: B) Domain Name System
Rationale: DNS (Domain Name System) translates human-readable
domain names into IP addresses to enable devices to communicate over
the internet.
7. Which of the following is an example of a lossless compression
algorithm?
A. JPEG
B. PNG
C. MP3
D. GIF
Answer: B) PNG
A. To interpret code line by line
B. To convert high-level code into machine code
C. To run the program directly from the source code
D. To manage memory during program execution
Answer: B) To convert high-level code into machine code
Rationale: A compiler translates high-level source code into machine
code or an intermediate code that can be executed by the computer.
2. Which of the following is true about the TCP/IP model?
A. It has 7 layers like the OSI model
B. It is used exclusively for wireless communication
C. It is a four-layer model
D. It requires a physical medium for communication
Answer: C) It is a four-layer model
Rationale: The TCP/IP model is a simplified, four-layer model used in
networking, contrasting with the OSI model which has seven layers.
3. Which of the following is an example of a hardware interrupt?
A. Software exception
,B. A signal from a keyboard when a key is pressed
C. A system call to read from a file
D. An error in a program
Answer: B) A signal from a keyboard when a key is pressed
Rationale: A hardware interrupt occurs when an external device, such
as a keyboard or mouse, sends a signal to the CPU to gain attention.
4. What is the main benefit of using version control systems like Git?
A. It reduces the cost of development
B. It allows multiple developers to work on the same project
simultaneously
C. It automates the testing process
D. It improves the speed of development
Answer: B) It allows multiple developers to work on the same project
simultaneously
Rationale: Version control systems like Git allow developers to
collaborate on the same codebase, track changes, and manage different
versions of the project efficiently.
5. Which of the following algorithms is used to find the shortest path in
a graph?
A. Merge Sort
B. Dijkstra’s Algorithm
, C. Bubble Sort
D. Breadth-First Search
Answer: B) Dijkstra’s Algorithm
Rationale: Dijkstra’s Algorithm is used to find the shortest path
between nodes in a graph, particularly in weighted graphs.
6. What does DNS stand for in networking?
A. Digital Network System
B. Domain Name System
C. Dynamic Network Security
D. Direct Network Service
Answer: B) Domain Name System
Rationale: DNS (Domain Name System) translates human-readable
domain names into IP addresses to enable devices to communicate over
the internet.
7. Which of the following is an example of a lossless compression
algorithm?
A. JPEG
B. PNG
C. MP3
D. GIF
Answer: B) PNG