Important Question

You are on page 1of 39

1. What does CPU stand for?

2. (A) Central Processing Unit (B) Computer Processing Unit (C) Control Processing Unit (D)
Centralized Processing Unit
Answer: (A) Central Processing Unit

3. Which of the following is not a type of computer memory?


4. (A) RAM (B) ROM (C) CPU (D) Cache
Answer: (C) CPU

5. What is the function of an operating system?


6. (A) Controls hardware components (B) Manages software applications (C) Provides user
interface (D) All of the above
Answer: (D) All of the above

7. What is the binary equivalent of the decimal number 12?


8. (A) 1010 (B) 1100 (C) 1110 (D) 1001
Answer: (B) 1100

9. Which programming language is widely used for system programming?


10. (A) Java (B) Python (C) C (D) Ruby
Answer: (C) C

Data Structures:

6. What is a stack in data structures?


7. (A) A linear data structure (B) A hierarchical data structure (C) A non-linear data structure
(D) None of the above
Answer: (A) A linear data structure

8. Which of the following data structures allows elements to be accessed randomly?


9. (A) Stack (B) Queue (C) Array (D) Linked List
Answer: (C) Array

10. What is the time complexity of searching in a binary search tree?


11. (A) O(n) (B) O(log n) (C) O(n^2) (D) O(1)
Answer: (B) O(log n)
12. What is a linked list?
13. (A) A collection of elements arranged in a linear order (B) A hierarchical data structure
(C) A non-linear data structure (D) A tree-like data structure
Answer: (A) A collection of elements arranged in a linear order

14. Which data structure follows the Last In First Out (LIFO) principle? (A) Queue (B) Stack
(C) Linked List (D) Tree
Answer: (B) Stack

DBMS:

11. What is a primary key in a database?


12. (A) A key that uniquely identifies each row in a table (B) A key that is used for sorting
data (C) A key that is used for joining tables (D) A key that can have duplicate values
Answer: (A) A key that uniquely identifies each row in a table

13. What is normalization in DBMS? (A) Process of reducing redundancy in a database (B)
Process of sorting data in a database (C) Process of adding indexes to a database (D)
Process of converting data into a different format
Answer: (A) Process of reducing redundancy in a database

14. Which SQL keyword is used to retrieve data from a database?


15. (A) GET (B) FETCH (C) SELECT (D) RETRIEVE
Answer: (C) SELECT

16. What does SQL stand for?


17. (A) Structured Query Language (B) Sequential Query Language (C) Systematic Query
Language (D) Stacked Query Language
Answer: (A) Structured Query Language

18. What is a foreign key in a database?


19. (A) A key that uniquely identifies each row in a table (B) A key that establishes a link
between two tables (C) A key that is used for sorting data (D) A key that can have
duplicate values
Answer: (B) A key that establishes a link between two tables
Computer Network:

16. Which of the following is not a network topology?


17. (A) Ring (B) Mesh (C) Circle (D) Star
Answer: (C) Circle

18. Which layer of the OSI model is responsible for data encryption and decryption?
19. (A) Physical Layer (B) Transport Layer (C) Presentation Layer (D) Session Layer
Answer: (C) Presentation Layer

20. What is a router in computer networking?


21. (A) A device that connects multiple computers within a LAN (B) A device that connects
two or more networks together (C) A device that converts digital signals to analog
signals (D) A device that provides wireless internet access
Answer: (B) A device that connects two or more networks together

22. Which protocol is used for sending emails over the internet? (A) FTP (B) SMTP (C) HTTP
(D) POP3
Answer: (B) SMTP

23. What is the purpose of DNS in computer networking?


24. (A) To convert domain names to IP addresses (B) To secure data transmission over the
internet (C) To manage network resources (D) To establish a connection between two
computers

Answer: (A) To convert domain names to IP addresses

1. What is the main function of the CPU?


2. (A) Data storage
(B) Data processing (Answer) (C) Data transfer
(D) User interaction
3. Which of the following is NOT a primary storage device? (A) RAM
(B) Hard Disk Drive (HDD) (C) Cache
(D) Register (Answer)

4. What is the binary equivalent of the decimal number 10? (A) 1010
(B) 0001 (Answer) (C) 1100
(D) 0100

5. What is the difference between software and hardware?


6. (A) Software is tangible, hardware is intangible. (Answer) (B) Software is the physical
components, hardware is the instructions. (C) There is no difference. (D) Software
controls hardware, hardware runs software.
pen_spark

7. What is the purpose of an operating system?


8. (A) To run applications
(B) To manage hardware resources (Answer) (C) To browse the internet
(D) To store data

9. What is the function of a compiler?


10. (A) To translate high-level code to machine code (Answer) (B) To interpret code line by
line (C) To link program modules together (D) To debug programs

11. What is a web browser used for? (A) To write code


(B) To access websites (Answer) (C) To manage files
(D) To edit photos

12. What is the difference between a bit and a byte? (A) A bit is a group of 8 bytes. (B) A
byte is a group of 8 bits (Answer) (C) They are the same thing. (D) A bit can store more
information than a byte.
13.
14. What is the purpose of a keyboard? (A) To display information
(B) To input data (Answer) (C) To store data
(D) To process data

15. What is a network interface card (NIC) used for? (A) To connect to a printer
(B) To connect to a network (Answer) (C) To connect to a monitor
(D) To connect to a storage device

Data Structures (10 Questions)


11. What is the time complexity of searching an element in a linked list? (A) O(1)
(B) O(log n)
(C) O(n) (Answer) (D) O(n^2)

12. What is the advantage of using a stack data structure? (A) Efficient random access
(B) Efficient insertion and deletion at the beginning or end (Answer) (C) Efficient
searching
(D) Efficient sorting

13. What is a binary tree? (A) A tree with only one child per node (B) A tree with a
maximum of two children per node (Answer) (C) A tree with a fixed number of children
per node (D) A non-linear data structure with no specific order

14. What is the difference between a queue and a stack? (A) Queues allow random
access, stacks do not. (B) Stacks allow random access, queues do not. (C) Queues
follow LIFO (Last In First Out), stacks follow FIFO (First In First Out) (Answer) (D)
Stacks are used for storing data, queues are used for processing data.

15. What is a hash table used for? (A) To store data in a sorted order
(B) To store key-value pairs for efficient retrieval (Answer) (C) To represent hierarchical
relationships
(D) To perform complex calculations

16. What is the time complexity of inserting an element into an array? (A) O(1)
(Answer)
(B) O(log n)
(C) O(n)
(D) O(n

1. Which of the following correctly declares a pointer to an integer variable in C++? (A)
int x; (B) int *x; (C) int &x; (D) int &*x;
Answer: (B) int *x;

2. What does the sizeof operator return in C++? (A) Size of a variable in bytes (B) Size of
a function in bytes (C) Size of a class in bytes (D) Size of a pointer in bytes
Answer: (A) Size of a variable in bytes

3. What is the output of the following code snippet?


cppCopy code
#include <iostream> using namespace std; int main() { int x = 5 ; cout << "Value of x: " << x << endl; cout <<
"Address of x: " << &x << endl; return 0 ; }
(A) Value of x: 5, Address of x: 0 (B) Value of x: 5, Address of x: Memory address (C)
Value of x: Memory address, Address of x: 5 (D) Compiler error
Answer: (B) Value of x: 5, Address of x: Memory address
4. Which of the following is not a valid variable name in C++? (A) my_variable (B) _variable
(C) 1variable (D) variable1
Answer: (C) 1variable
5. What is the correct syntax to define a class in C++? (A) class MyClass : public
BaseClass {}; (B) class MyClass extends BaseClass {}; (C) class MyClass -
BaseClass {}; (D) class MyClass {public:};
Answer: (A) class MyClass : public BaseClass {};
6. What does the new operator in C++ do? (A) Allocates memory for a variable (B)
Deallocates memory for a variable (C) Initializes a variable (D) Copies a variable
Answer: (A) Allocates memory for a variable
7. What is the output of the following code snippet?
cppCopy code
#include <iostream> using namespace std; int main() { int arr[ 5 ] = { 1 , 2 , 3 , 4 , 5 }; cout << arr[ 5 ]; return 0 ;
}
(A) 5 (B) 1 (C) Compiler error (D) Runtime error
Answer: (D) Runtime error
8. What is the result of the expression 5 + 3 * 2 in C++? (A) 16 (B) 11 (C) 13 (D) 10
Answer: (C) 13
9. Which of the following is not a valid access specifier in C++? (A) public (B) private (C)
protected (D) static
Answer: (D) static
10. What is the output of the following code snippet?
cppCopy code
#include <iostream> using namespace std; int main() { int x = 5 ; int *ptr = &x; cout << *ptr; return 0 ; }
(A) 0 (B) Garbage value (C) Compiler error (D) 5
Answer: (D) 5

1. What is the correct header file to include for input/output operations in C++? (A)
<stdio.h>
(B) <iostream> (Answer)
(C) <cstdio>
(D) <input.h>

2. Which of the following is a valid data type in C++? (A) float32


(B) int (Answer)
(C) string (Answer)
(D) array

3.
4. What is the purpose of the using namespace std; statement? (A) To define a new
namespace
(B) To avoid writing std:: before standard library elements (Answer)
(C) To increase program efficiency
(D) To improve code readability

5. What is the difference between a = and == operator in C++? (A) = assigns a value,
== checks for equality (Answer)
(B) = creates a new variable, == compares memory addresses
(C) They are the same thing
(D) = is for integers, == is for strings

6.
7. What is the syntax for declaring a variable in C++?
8. (A) var_name = value;
(B) data_type var_name; (Answer)
(C) int name
(D) create var_name (data_type);

9. What is a loop used for in C++? (A) To define a function


(B) To execute a block of code repeatedly (Answer)
(C) To declare variables
(D) To print messages

10.
11. Which of the following is a type of loop in C++?
12. (A) if statement
(B) for loop (Answer)
(C) goto statement (deprecated)
(D) All of the above

13. What is the difference between an if statement and an if-else statement?


14. (A) if executes code if a condition is true, if-else executes code if true or false.
(Answer)
(B) if takes multiple conditions, if-else takes one condition.
(C) They are the same thing.
(D) if is for integers, if-else is for strings.

15.
16. What is a function in C++?
17. (A) A block of code that performs a specific task (Answer)
(B) A variable that stores data
(C) A loop that repeats code
(D) A comment that explains code
18. What is the purpose of a return statement in a function? (A) To define the function's
name
(B) To return a value from the function (Answer)
(C) To call another function
(D) To end the function

19. What is an array in C++? (A) A single variable that can store multiple values
(B) A collection of elements of the same data type (Answer)
(C) A loop that iterates a certain number of times
(D) A function that takes arguments

20. How do you access elements in an array in C++?


21. (A) By variable name
(B) By index (position within the array) (Answer)

1. In a relational database, a tuple is also known as: (A) Record (B) Attribute (C) Field (D)
Column
Answer: (A) Record

2. Which of the following is not a type of database model? (A) Hierarchical (B) Network (C)
Relational (D) Linear
Answer: (D) Linear

3. What is the purpose of the SQL SELECT statement? (A) To insert data into a table (B) To
update existing data in a table (C) To delete data from a table (D) To retrieve data from
a table
Answer: (D) To retrieve data from a table

4. In a relational database, what does the term "foreign key" represent? (A) A key that
uniquely identifies each record in a table (B) A key that references the primary key of
another table (C) A key that is automatically generated by the database system (D) A key
that is used to enforce referential integrity
Answer: (B) A key that references the primary key of another table

5. Which of the following SQL commands is used to delete a table? (A) DELETE (B) DROP
(C) REMOVE (D) ERASE
Answer: (B) DROP

6. In the context of databases, what does ACID stand for? (A) All Columns In Database (B)
Atomicity, Consistency, Integrity, Durability (C) Associated Columns In Database (D) All
Changes In Data
Answer: (B) Atomicity, Consistency, Integrity, Durability

7. Which of the following SQL commands is used to add new rows to a table? (A) INSERT
INTO (B) ADD ROW (C) CREATE ROW (D) UPDATE TABLE
Answer: (A) INSERT INTO

8. In a relational database, what is the primary key? (A) A key that is used to access the
database (B) A key that uniquely identifies each record in a table (C) A key that
references the foreign key of another table (D) A key that is used for encryption
purposes
Answer: (B) A key that uniquely identifies each record in a table

9. Which of the following SQL commands is used to change data in a table? (A) MODIFY
(B) CHANGE (C) ALTER (D) UPDATE
Answer: (D) UPDATE

10. What is the purpose of the SQL JOIN clause? (A) To select all rows from a table (B) To
combine rows from different tables based on a related column (C) To delete rows from a
table (D) To create a new table
Answer: (B) To combine rows from different tables based on a related column

1. What is the full form of DBMS?


2. (A) Data Management Base System (B) Database Management System (Answer)
(C) DataBase Management Service
(D) Data Base Management Software

3. What is the primary function of a DBMS?

4. (A) To process data


(B) To manage and organize data in a structured way (Answer)
(C) To display data on screen
(D) To create reports

5.
6. What are the ACID properties of a transaction?
7. (A) Atomicity, Consistency, Isolation, Duplication
(B) Atomicity, Consistency, Isolation, Durability (Answer)
(C) Accuracy, Consistency, Independence, Durability
(D) Accessibility, Consistency, Independence, Duplication

8.
9. What is a relation (table) in a database?
10. (A) A collection of unrelated data
(B) A two-dimensional structure to store data (Answer)
(C) A program that manipulates data
(D) A user interface for interacting with the database

11. What is a schema in a database?


12. (A) A specific table within a database
(B) The overall logical structure of the database (Answer)
(C) A physical storage location for data
(D) A query language used to access data

13. What is the difference between DDL and DML? (A) DDL defines the database
structure, DML manipulates data within the structure. (Answer)
(B) DDL deletes data, DML modifies data.
(C) DDL creates reports, DML displays data.
(D) DDL is for users, DML is for administrators.

14. What is SQL?


15. (A) A database management system
(B) A programming language
(C) A data structure
(D) A Structured Query Language (Answer)
16.
17. What is the SELECT statement used for in SQL?
18. (A) To create a table
(B) To insert data into a table
(C) To retrieve data from a table (Answer)
(D) To delete data from a table
19.
20. What is the WHERE clause used for in SQL?
21. (A) To specify which columns to retrieve
(B) To sort the retrieved data
(C) To filter data based on a condition (Answer)
(D) To join multiple tables

22. What is a join operation in SQL?


23. (A) To combine data from multiple tables based on a related column (Answer)
(B) To update data in a table
(C) To delete data from a table
(D) To create a new table

24. What is normalization in a database?


25. (A) The process of optimizing the database structure to reduce redundancy (Answer)
(B) The process of creating new tables
26.
(C) The process of securing the database
(D) The process of backing up the database

27. What is the difference between first normal form (1NF) and second normal form
(2NF)?
(A) 1NF eliminates repeating groups, 2NF eliminates partial dependencies. (Answer)
(B) 1NF removes duplicate data, 2NF removes null values.
(C) There is no difference.
(D) 1NF is for numeric data, 2NF is for character data.

28. What is a primary key in a database?


29. (A) A unique identifier for each row in a table (Answer)
(B) A column that describes the data type
(C) A column used to join tables
(D) A column that can be null

30. What is a foreign key in a database? (A) A unique identifier for each row in a table
(B) A reference to the primary key of another table (Answer)
(C) A column that describes the data type
(D) A column used to sort data

1. Which of the following layers of the OSI model is responsible for routing packets?
(A) Physical Layer (B) Data Link Layer (C) Network Layer (D) Transport Layer
Answer: (C) Network Layer

2. What is the function of ARP (Address Resolution Protocol) in computer networks?


(A) It converts IP addresses to MAC addresses (B) It converts MAC addresses to IP
addresses (C) It converts domain names to IP addresses (D) It converts IP addresses to
domain names
Answer: (A) It converts IP addresses to MAC addresses

3. Which of the following devices operates at the Network Layer of the OSI model?
(A) Hub (B) Switch (C) Router (D) Repeater
Answer: (C) Router

4. What is the purpose of a firewall in a computer network?


(A) To amplify network signals (B) To prevent unauthorized access to or from a private
network (C) To connect multiple networks together (D) To regulate network traffic
Answer: (B) To prevent unauthorized access to or from a private network

5. What is the role of DNS (Domain Name System) in computer networks?


(A) To convert domain names to IP addresses (B) To encrypt network traffic (C) To
provide network security (D) To manage network resources
Answer: (A) To convert domain names to IP addresses
6. Which of the following protocols is used for secure communication over a computer
network? (A) HTTP (B) FTP (C) SSH (D) SMTP
Answer: (C) SSH (Secure Shell)

7. What is the maximum data rate of Ethernet in a standard Ethernet network?


(A) 10 Mbps (B) 100 Mbps (C) 1 Gbps (D) 10 Gbps
Answer: (C) 1 Gbps

8. Which of the following is an example of a wireless communication technology?


(A) Ethernet (B) Bluetooth (C) Fiber optics (D) Coaxial cable
Answer: (B) Bluetooth

9. In TCP/IP protocol suite, which protocol is responsible for assigning IP addresses


dynamically?
(A) DHCP (Dynamic Host Configuration Protocol) (B) DNS (Domain Name System) (C)
FTP (File Transfer Protocol) (D) SMTP (Simple Mail Transfer Protocol)
Answer: (A) DHCP (Dynamic Host Configuration Protocol)

10. Which of the following network devices operates at the Data Link Layer of the OSI
model?
(A) Router (B) Bridge (C) Repeater (D) Gateway
Answer: (B) Bridge

1. What is the role of a network device called a router?

(A) Connects devices within a small network (like a switch)


(B) Connects different networks and forwards data packets based on their destination
addresses (Answer)
(C) Provides internet access to devices
(D) Encrypts data for secure communication

2. What is the full form of TCP/IP? (A) Transmission Control Protocol/Internet Protocol
(Answer)
(B) Text Communication Protocol/Internet Provider
(C) Transfer Control Protocol/Internet Port
(D) Technical Communication Protocol/Internet Protocol
3. What is the difference between a network and the internet? (A) A network is private,
the internet is public (Answer)
(B) A network is wired, the internet is wireless
(C) There is no difference
(D) A network is for communication, the internet is for browsing

4. What is the function of a MAC address in a network? (A) Identifies a website on the
internet
(B) Uniquely identifies a network device on a local network (Answer)
(C) Defines a user's IP address
(D) Stores browsing history

5.

6.
7. What is a subnet mask used for in an IP address? (A) Defines the network portion of
an IP address (Answer)
(B) Specifies the port number
(C) Determines the geographical location of the device
(D) Encrypts the IP address

8. What is the difference between a wired and a wireless network? (A) Wired uses
cables, wireless uses radio waves (Answer)
(B) Wired is faster, wireless is slower
(C) Wired is more secure, wireless is less secure
(D) All of the above (Answer)

9.
10. What is a firewall used for in a network? (A) Connects devices to the internet
(B) Monitors and controls incoming and outgoing network traffic for security (Answer)
(C) Shares files between devices
(D) Encrypts data during communication
11.
12. What is the difference between HTTP and HTTPS?
13. (A) HTTP is for websites, HTTPS is for emails
(B) HTTP is secure, HTTPS is not secure
(C) HTTPS is faster, HTTP is slower
(D) There is no difference
(B) HTTP uses port 80, HTTPS uses port 443 (Answer)

14. What is a protocol in a network? (A) A physical device like a router


(B) A set of rules that govern how devices communicate (Answer)
(C) A website address
(D) A software program for browsing the internet

15. What is the difference between a client and a server in a network? (A) A client
requests resources, a server provides them (Answer)
(B) A client is a software program, a server is a hardware device
(C) There is no difference
(D) A client is faster, a server is slower

16. What is the purpose of a DNS server? (A) Stores websites and their content
(B) Translates domain names (like [invalid URL removed]) into IP addresses (Answer)
(C) Encrypts communication between devices
(D) Blocks access to malicious websites

17. What does bandwidth represent in a network? (A) The type of cable used
(B) The amount of data that can be transmitted over a network in a given amount of
time (Answer)
(C) The security level of the network
(D) The number of devices connected to the network

18. What is a common type of network topology?


19. (A) Star (devices connect to a central hub) (Answer)
(B) Square (devices connect to each other in a square pattern)
(C) Triangle (devices connect to each other in a triangle pattern)
(D) Circle (devices connect to each other in a circle)

1. What does the term "addressing mode" refer to in computer architecture? (A) The
method used to access memory (B) The format of instructions in machine language (C)
The technique used to store data in registers (D) The protocol used for communication
between computers
Answer: (A) The method used to access memory

2. Which addressing mode uses a constant value embedded in the instruction? (A) Register
addressing mode (B) Immediate addressing mode (C) Direct addressing mode (D)
Indirect addressing mode
Answer: (B) Immediate addressing mode

3. In which addressing mode, the address of the operand is given explicitly? (A) Register
addressing mode (B) Immediate addressing mode (C) Direct addressing mode (D)
Indirect addressing mode
Answer: (C) Direct addressing mode

4. Which addressing mode involves accessing data indirectly through a memory location?
(A) Register addressing mode (B) Immediate addressing mode (C) Direct addressing
mode (D) Indirect addressing mode
Answer: (D) Indirect addressing mode

5. Which addressing mode uses a fixed register to hold the address of the operand? (A)
Register addressing mode (B) Immediate addressing mode (C) Direct addressing mode
(D) Indirect addressing mode
Answer: (A) Register addressing mode
6. Which addressing mode allows the operand to be specified implicitly in the instruction?
(A) Register addressing mode (B) Immediate addressing mode (C) Direct addressing
mode (D) Implicit addressing mode
Answer: (D) Implicit addressing mode

7. What is the primary advantage of using indirect addressing mode? (A) It allows for
shorter instructions (B) It provides faster access to memory (C) It allows for flexible
addressing (D) It reduces the complexity of the instruction set
Answer: (C) It allows for flexible addressing
8. Which addressing mode involves adding an offset to a base address to access memory?
(A) Base addressing mode (B) Indexed addressing mode (C) Stack addressing mode (D)
Relative addressing mode
Answer: (B) Indexed addressing mode

9. In which addressing mode, the effective address is computed by adding the contents of
a base register and an index register? (A) Base addressing mode (B) Indexed addressing
mode (C) Stack addressing mode (D) Relative addressing mode
Answer: (B) Indexed addressing mode

10. Which addressing mode is commonly used for accessing elements in arrays? (A) Base
addressing mode (B) Indexed addressing mode (C) Stack addressing mode (D) Relative
addressing mode
Answer: (B) Indexed addressing mode

11. Which addressing mode uses the top of the stack as the operand? (A) Base addressing
mode (B) Indexed addressing mode (C) Stack addressing mode (D) Relative addressing
mode
Answer: (C) Stack addressing mode

12. In which addressing mode, the operand is specified as an offset from the current
program counter or instruction pointer? (A) Base addressing mode (B) Indexed
addressing mode (C) Stack addressing mode (D) Relative addressing mode
Answer: (D) Relative addressing mode

13. Which addressing mode is used for implementing subroutine calls and returns? (A) Base
addressing mode (B) Indexed addressing mode (C) Stack addressing mode (D) Relative
addressing mode
Answer: (C) Stack addressing mode
14. Which addressing mode is commonly used in high-level programming languages like C
and C++? (A) Base addressing mode (B) Indexed addressing mode (C) Stack addressing
mode (D) Relative addressing mode
Answer: (D) Relative addressing mode

15. Which addressing mode uses a constant value that is added to the contents of a register
to compute the effective address? (A) Base addressing mode (B) Indexed addressing
mode (C) Stack addressing mode (D) Relative addressing mode
Answer: (A) Base addressing mode

1. What is the role of addressing mode in a computer instruction? (A) Defines the
operation to be performed
(B) Specifies the data type of operands
(C) Indicates how the effective memory address is calculated for data access
(Answer)
(D) Stores the result of the instruction

2. In the instruction ADD A, #5, what addressing mode is used? (A) Immediate
addressing (Answer)
(B) Direct addressing
(C) Register addressing
(D) Indirect addressing

3. Which addressing mode uses a register to hold the memory address? (A)
Immediate addressing
(B) Direct addressing
(C) Register addressing (Answer)
(D) Indirect addressing

4. In the instruction MOV R1, [R2], what addressing mode is used? (A) Immediate
addressing
(B) Direct addressing
(C) Register addressing
(D) Indirect addressing (Answer)
5. What is the advantage of using direct addressing mode? (A) More secure
(B) More flexible
(C) Simpler and faster (Answer)
(D) Requires fewer registers

6. What is the drawback of using immediate addressing mode? (A) More complex
(B) Requires more memory
(C) Limits the amount of immediate data (Answer)
(D) Slower execution

7.
8. What addressing mode is useful for accessing data within a loop? (A) Immediate
addressing
(B) Direct addressing
(C) Register addressing (Answer)
(D) Base addressing

9. What is base addressing mode? (A) Uses a fixed memory location


(B) Uses a register to hold the base address
(C) Uses another memory location for the address
(D) Uses a constant value as the address (Answer)

10.
11. What addressing mode uses a pointer to access memory? (A) Immediate
addressing
(B) Direct addressing
(C) Register addressing
(D) Indirect addressing with a pointer (Answer)

12. What is the difference between register addressing and indirect addressing? (A)
Register addressing uses registers for data, indirect uses registers for addresses
(Answer)
(B) Register addressing is faster, indirect addressing is slower
(C) There is no difference
(D) Register addressing uses immediate values, indirect uses memory locations

13. Which addressing mode is most suitable for function calls? (A) Immediate
addressing
(B) Direct addressing
(C) Register addressing (for passing arguments) (Answer)
(D) Indirect addressing

14. What is the role of the program counter (PC) in addressing? (A) Stores the base
address for memory access
(B) Holds the address of the next instruction to be executed (Answer)
(C) Stores temporary data during calculations
(D) Defines the memory size of the program

15. What is the benefit of using relative addressing mode?

pen_spark

(A) Easier to understand for programmers


(B) More efficient for memory usage
(C) Enables position-independent code (useful for shared libraries) (Answer)
(D) Improves data security

16. What is the difference between logical address and physical address? (A) Logical
address is used by the CPU, physical address is used by memory (Answer)
(B) Logical address is a symbolic name, physical address is a binary number (Answer)
(C) There is no difference
(D) Logical address is for data, physical address is for instructions
17. What is the purpose of a memory management unit (MMU) in addressing? (A)
Performs calculations for memory access
(B) Translates logical addresses to physical addresses (Answer)
(C) Stores frequently used data for faster access
(D) Protects memory from unauthorized access

1. What is the primary function of a storage device? (A) To process data (B) To display data
(C) To store and retrieve data (D) To connect devices
Answer: (C) To store and retrieve data

2. What does RAM stand for? (A) Read-Only Memory (B) Random Access Memory (C) Read
and Modify Memory (D) Ready to Access Memory
Answer: (B) Random Access Memory

3. Which type of memory is volatile and loses its data when the power is turned off? (A)
RAM (B) ROM (C) EPROM (D) PROM
Answer: (A) RAM

4. Which of the following is a type of ROM that can be modified after manufacture? (A)
RAM (B) ROM (C) EPROM (D) PROM
Answer: (C) EPROM

5. What does EPROM stand for? (A) Erasable Programmable Read-Only Memory (B)
Electrically Programmable Read-Only Memory (C) Erasable and Programmable Random
Access Memory (D) Electrically Programmable Random Access Memory
Answer: (A) Erasable Programmable Read-Only Memory
6. Which of the following storage devices is non-volatile? (A) RAM (B) ROM (C) EPROM (D)
RAM and ROM both
Answer: (B) ROM

7. What is the primary function of ROM? (A) To store data permanently (B) To provide
temporary storage (C) To process data (D) To display data
Answer: (A) To store data permanently
8. Which of the following is not a characteristic of ROM? (A) Volatile (B) Non-volatile (C)
Read-only (D) Permanent
Answer: (A) Volatile

9. Which type of memory can be written to only once after manufacture? (A) RAM (B) ROM
(C) EPROM (D) PROM
Answer: (D) PROM

10. What does PROM stand for? (A) Programmable Read-Only Memory (B) Programmable
Random Access Memory (C) Programmable Erasable Memory (D) Programmed ROM
Answer: (A) Programmable Read-Only Memory

11. Which of the following is true regarding EPROM? (A) It can be reprogrammed multiple
times (B) It retains data even when power is turned off (C) It is cheaper compared to
other types of memory (D) It can only be programmed once
Answer: (A) It can be reprogrammed multiple times

12. What is the primary difference between RAM and ROM? (A) RAM is volatile, while ROM
is non-volatile (B) RAM is non-volatile, while ROM is volatile (C) RAM can be written to
multiple times, while ROM is generally read-only (D) RAM is generally used for long-
term storage, while ROM is used for temporary storage
Answer: (C) RAM can be written to multiple times, while ROM is generally read-only

13. Which storage device is typically used to store the BIOS in a computer system? (A) RAM
(B) ROM (C) EPROM (D) PROM
Answer: (B) ROM

14. Which type of memory is used to store firmware?


(A) RAM (B) ROM (C) EPROM (D) PROM
Answer: (B) ROM

15. Which of the following is an example of volatile memory? (A) Hard disk drive (HDD) (B)
Solid-state drive (SSD) (C) RAM (D) DVD
Answer: (C) RAM
1. What is a data structure? (A) A way of storing data in computer memory (B) A way of
representing data and the relationship between data elements (C) A way of organizing
data for efficient retrieval (D) All of the above
Answer: (D) All of the above

2. Which data structure follows the Last In First Out (LIFO) principle? (A) Queue (B) Circular
queue (C) Stack (D) Linked list
Answer: (C) Stack

3. What is the main advantage of using a stack data structure? (A) It allows for random
access of elements (B) It ensures that the first element inserted is the first one to be
removed (C) It provides constant-time access to any element (D) It facilitates efficient
recursive algorithms and function calls
Answer: (D) It facilitates efficient recursive algorithms and function calls

4. Which operation in a stack data structure removes an element from the top? (A) pop()
(B) push() (C) top() (D) peek()
Answer: (A) pop()

5. What is the time complexity of the push() and pop() operations in a stack implemented
using an array? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2)
Answer: (A) O(1)

6. Which data structure follows the First In First Out (FIFO) principle? (A) Queue (B) Circular
queue (C) Stack (D) Linked list
Answer: (A) Queue

7. What is the main advantage of using a queue data structure? (A) It allows for random
access of elements (B) It ensures that the first element inserted is the first one to be
removed (C) It provides constant-time access to any element (D) It facilitates efficient
recursive algorithms and function calls
8.
Answer: (B) It ensures that the first element inserted is the first one to be removed
9. Which operation in a queue data structure removes an element from the front? (A)
dequeue() (B) enqueue() (C) front() (D) peek()
Answer: (A) dequeue()

10. What is the time complexity of the enqueue() and dequeue() operations in a queue
implemented using an array? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2)
Answer: (A) O(1)

11. What is a circular queue? (A) A queue with no limit on the number of elements it can
store (B) A queue where elements can only be added at the rear and removed from the
front (C) A queue where the last element is connected to the first element (D) A queue
where elements can be accessed randomly
Answer: (C) A queue where the last element is connected to the first element

12. What is the advantage of using a circular queue over a regular queue? (A) It allows for
constant-time access to any element (B) It provides better memory utilization (C) It
ensures that elements are always stored in sorted order (D) It allows for parallel
processing of elements
Answer: (B) It provides better memory utilization

13. Which data structure is used to implement a circular queue? (A) Array (B) Linked list (C)
Stack (D) Tree
Answer: (A) Array

14. What is a linked list? (A) A linear data structure where elements are stored in contiguous
memory locations (B) A data structure consisting of a collection of elements, each
pointing to the next element (C) A data structure that allows for constant-time access to
any element (D) A data structure where elements can be accessed randomly
Answer: (B) A data structure consisting of a collection of elements, each pointing to the
next element

15. What is the time complexity of inserting or deleting an element at the beginning or end
of a linked list? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2)
Answer: (A) O(1)
16. Which operation in a linked list data structure is used to insert an element at the end?
(A) insertAtEnd() (B) insertAtBeginning() (C) insertAtPosition() (D) insertAfter()
Answer: (A) insertAtEnd()

1. What is the time complexity of enqueue operation in a linear queue? (A) O(1)
(Answer)
(B) O(log n)
(C) O(n)
(D) O(n^2)

2. What is the time complexity of dequeue operation in a linear queue?

3. (A) O(1) (Answer)


(B) O(log n)
(C) O(n)
(D) O(n^2)

4.
5. What data structure can be used to implement a queue efficiently? (A) Array
(B) Linked List (Answer)
(C) Tree
(D) Hash Table

Circular Queues

4. What is the advantage of a circular queue over a linear queue? (A) Faster insertion
(B) Faster deletion
(C) More efficient memory usage for bounded size queues (Answer)
(D) Easier implementation
5. How can you check if a circular queue is full? (A) Check if the front and rear pointers
are equal.
(B) Check if the rear pointer is one position behind the front pointer. (Answer)
(C) Check if the front pointer is null.
(D) Count the number of elements in the queue.

6.

Stacks

6. What is the LIFO (Last In First Out) principle related to?

(A) Queues
(B) Stacks (Answer)
(C) Linked Lists
(D) Trees

7.
8. What is the time complexity of push operation in a stack implemented using an
array?
9. (A) O(1) (Answer)
(B) O(log n)
(C) O(n)
(D) O(n^2)
10.
11. What is the time complexity of pop operation in a stack implemented using a
linked list? (A) O(1) (Answer)
(B) O(log n)
(C) O(n)
(D) O(n^2)

Linked Lists

9. What is the difference between a singly linked list and a doubly linked list? (A)
Singly linked list nodes have one pointer, doubly linked list nodes have two pointers
(one to the next and one to the previous node) (Answer)
(B) Singly linked list is faster, doubly linked list is slower.
(C) Singly linked list is for storing data, doubly linked list is for traversing data.
(D) Singly linked list is more complex, doubly linked list is simpler.

10. What is the advantage of a linked list over an array?


(A) Faster random access
(B) Faster insertion and deletion at any position (Answer)
(C) More efficient memory usage for sparse data
(D) Easier to implement

11. What is a head node in a linked list?


12. (A) The last node in the list
(B) A special node that points to the first node in the list (Answer)
(C) A node that stores metadata about the list
(D) There is no head node in a linked list.
13. How do you traverse a singly linked list? (A) By iterating through an index
(B) By following the pointer from one node to the next until a null pointer is encountered
(Answer)
(C) By using a recursive function
(D) There is no efficient way to traverse a linked list.

General

13. What is the time complexity of searching an element in a linked list? (A) O(1)
(B) O(log n)
(C) O(n) (Answer)
(D) O(n^2)
14. What data structure is best suited for implementing an undo/redo functionality?
(A) Array
(B) Stack (Answer)

1. What is the primary goal of object-oriented programming (OOP)? (A) Code reusability
(B) Encapsulation (C) Inheritance (D) All of the above
Answer: (D) All of the above

2. Which OOP concept allows hiding the internal details of a class from the outside world?
(A) Inheritance (B) Encapsulation (C) Polymorphism (D) Abstraction
Answer: (B) Encapsulation

3. In C++, what keyword is used to declare a class?


4. (A) class (B) struct (C) object (D) private
Answer: (A) class
5. What is inheritance in object-oriented programming?
6. (A) The ability of a class to inherit properties and behavior from another class (B) The
process of creating multiple instances of a class (C) The ability to access class members
from outside the class (D) The process of hiding the implementation details of a class
Answer: (A) The ability of a class to inherit properties and behavior from another class

7. Which access specifier in C++ allows class members to be accessed only by the member
functions of the same class? (
8. A) public (B) private (C) protected (D) friend
Answer: (B) private

9. What is polymorphism in object-oriented programming? (A) The ability of a class to


have multiple constructors (B) The ability of a function to have multiple implementations
(C) The ability to store different data types in the same variable (D) The process of
creating multiple instances of a class
Answer: (B) The ability of a function to have multiple implementations

10. What is function overloading in C++? (A) Defining multiple functions with the same
name but different parameters (B) Defining a function inside another function (C)
Defining a function that calls itself (D) Defining a function with a variable number of
arguments
Answer: (A) Defining multiple functions with the same name but different parameters

11. What is the purpose of constructors in C++? (A) To allocate memory for objects (B) To
initialize the data members of an object (C) To define the behavior of an object (D) To
destroy objects when they are no longer needed
Answer: (B) To initialize the data members of an object

12. What is the purpose of destructors in C++? (A) To allocate memory for objects (B) To
initialize the data members of an object (C) To define the behavior of an object (D) To
destroy objects when they are no longer needed
Answer: (D) To destroy objects when they are no longer needed

13. What is encapsulation in object-oriented programming? (A) The process of hiding the
implementation details of a class (B) The process of inheriting properties and behavior
from another class (C) The process of creating multiple instances of a class (D) The
process of accessing class members from outside the class
Answer: (A) The process of hiding the implementation details of a class

14. What is dynamic polymorphism in C++? (A) Polymorphism achieved at compile-time (B)
Polymorphism achieved at runtime (C) Polymorphism achieved through function
overloading (D) Polymorphism achieved through function overriding
Answer: (B) Polymorphism achieved at runtime

15. Which keyword is used to create an object of a class in C++? (A) new (B) delete (C)
create (D) instance
Answer: (A) new

16. What is the purpose of the virtual keyword in C++?


17. (A) To indicate that a function should be implemented in a derived class (B) To indicate
that a function should not be overridden in a derived class (C) To indicate that a
function should be called by default (D) To indicate that a function should be called
dynamically
Answer: (A) To indicate that a function should be implemented in a derived class

18. What is the difference between struct and class in C++? (A) struct members are
public by default, while class members are private by default (B) struct members are
private by default, while class members are public by default (C) There is no difference
between struct and class (D) struct is used for inheritance, while class is not
Answer: (A) struct members are public by default, while class members are private by
default

19. Which concept in C++ allows a class to inherit properties and behavior from multiple
base classes? (A) Inheritance (B) Encapsulation (C) Polymorphism (D) Multiple
inheritance
Answer: (D) Multiple inheritance

1. What does OSI stand for in the OSI model? (A) Open Systems Interconnection (B) Operational
System Integration (C) Online System Interface (D) Operating Systems Interchange
Answer: (A) Open Systems Interconnection
2. How many layers are there in the OSI model? (A) 5 (B) 6 (C) 7 (D) 8
Answer: (C) 7

3. Which layer of the OSI model is responsible for routing and addressing? (A) Data Link Layer (B)
Network Layer (C) Transport Layer (D) Session Layer
Answer: (B) Network Layer
4. In the TCP/IP model, which layer is equivalent to the Transport layer in the OSI model? (A)
Application Layer (B) Internet Layer (C) Network Interface Layer (D) Transport Layer
Answer: (D) Transport Layer

5. What is the primary function of the Data Link layer in the OSI model? (A) End-to-end communication
(B) Host-to-host communication (C) Physical addressing (D) Error detection and correction
Answer: (C) Physical addressing

6. Which layer of the OSI model is responsible for establishing, managing, and terminating sessions
between applications? (A) Transport Layer (B) Presentation Layer (C) Session Layer (D) Application
Layer
Answer: (C) Session Layer

7. Which layer of the OSI model provides reliable, connection-oriented communication between end
systems? (A) Network Layer (B) Transport Layer (C) Data Link Layer (D) Physical Layer
Answer: (B) Transport Layer

8. Which protocol operates at the Network layer of the TCP/IP model? (A) TCP (B) UDP (C) IP (D) HTTP
Answer: (C) IP

9. Which layer of the OSI model is responsible for encryption and decryption of data? (A) Network
Layer (B) Presentation Layer (C) Data Link Layer (D) Application Layer
Answer: (B) Presentation Layer

10. Which protocol is used for transmitting email over the Internet? (A) FTP (B) SMTP (C) SNMP (D) HTTP
Answer: (B) SMTP

11. Which layer of the OSI model is responsible for translating data formats between communicating
devices? (A) Network Layer (B) Presentation Layer (C) Transport Layer (D) Session Layer
Answer: (B) Presentation Layer
12. Which protocol is used for transferring files over a network? (A) FTP (B) HTTP (C) SMTP (D) TCP
Answer: (A) FTP

13. Which layer of the OSI model provides error detection and correction at the physical level? (A)
Transport Layer (B) Data Link Layer (C) Network Layer (D) Physical Layer
Answer: (D) Physical Layer

14. Which protocol is used for retrieving emails from a remote server? (A) SMTP (B) POP3 (C) IMAP (D)
FTP
Answer: (B) POP3

15. Which layer of the OSI model deals with the actual physical connection between devices? (A) Data
Link Layer (B) Transport Layer (C) Network Layer (D) Physical Layer
Answer: (D) Physical Layer

.
:

1. Which layer of the OSI model is responsible for defining the format and organization of data
packets? (A) Physical Layer (B) Data Link Layer (C) Network Layer (D) Transport Layer
Answer: (C) Network Layer

2. Which protocol operates at the Transport layer of the OSI model? (A) IP (B) FTP (C) TCP (D) HTTP
Answer: (C) TCP
3. What protocol is commonly used for secure communication over a network? (A) TCP (B) HTTP (C)
HTTPS (D) FTP
Answer: (C) HTTPS

4. Which layer of the OSI model is responsible for transmitting data between adjacent network nodes?
(A) Data Link Layer (B) Transport Layer (C) Physical Layer (D) Session Layer
Answer: (A) Data Link Layer

5. What device is used to connect multiple computers in a local area network (LAN)? (A) Modem (B)
Router (C) Switch (D) Hub
Answer: (C) Switch

6. Which protocol is used for transferring files between a client and a server over a network? (A) FTP (B)
HTTP (C) SMTP (D) SNMP
Answer: (A) FTP
7. What is the purpose of the DHCP protocol? (A) To convert IP addresses into domain names (B) To
translate web addresses into IP addresses (C) To dynamically assign IP addresses to devices on a
network (D) To ensure secure communication over a network
Answer: (C) To dynamically assign IP addresses to devices on a network

8. Which device is used to connect multiple networks together? (A) Modem (B) Switch (C) Router (D)
Hub
Answer: (C) Router

9. What protocol is used for sending emails over the Internet? (A) TCP (B) FTP (C) SMTP (D) DHCP
Answer: (C) SMTP

10. What is the purpose of the DNS protocol? (A) To dynamically assign IP addresses to devices on a
network (B) To convert IP addresses into domain names (C) To ensure secure communication over a
network (D) To transfer files between a client and a server
Answer: (B) To convert IP addresses into domain names

11. What device is used to amplify and retransmit network signals? (A) Modem (B) Switch (C) Repeater
(D) Router
Answer: (C) Repeater

12. Which protocol is used for real-time communication over the Internet? (A) HTTP (B) FTP (C) SIP (D)
SMTP
Answer: (C) SIP

13. What is the purpose of the ARP protocol? (A) To translate web addresses into IP addresses (B) To
dynamically assign IP addresses to devices on a network (C) To convert IP addresses into domain
names (D) To map IP addresses to MAC addresses
Answer: (D) To map IP addresses to MAC addresses

14. What device is used to connect computers to a network wirelessly? (A) Modem (B) Router (C) Access
Point (D) Switch
Answer: (C) Access Point

15. Which protocol is used for remotely accessing and managing network devices? (A) FTP (B) SNMP (C)
DHCP (D) SMTP
Answer: (B) SNMP

1. What is the size of an IPv4 address? (A) 32 bits (B) 64 bits (C) 128 bits (D) 256 bits
Answer: (A) 32 bits
2. How many bits are used for the network portion and host portion in an IPv4 address? (A) 16 bits
network, 16 bits host (B) 24 bits network, 8 bits host (C) 28 bits network, 4 bits host (D) 32 bits
network, 0 bits host
Answer: (B) 24 bits network, 8 bits host

3. What is the main advantage of IPv6 over IPv4? (A) Larger address space (B) Smaller address space (C)
Faster data transmission (D) Improved security
Answer: (A) Larger address space

4. How many bits are used for the address in IPv6? (A) 32 bits (B) 64 bits (C) 128 bits (D) 256 bits
Answer: (C) 128 bits

5. Which notation is used to represent an IPv6 address? (A) Decimal notation (B) Binary notation (C)
Hexadecimal notation (D) Octal notation
Answer: (C) Hexadecimal notation

6. What is the purpose of MAC addresses? (A) To uniquely identify a device on a network (B) To
uniquely identify a network interface card (NIC) (C) To determine the network portion of an IP
address (D) To encrypt data transmission over a network
Answer: (B) To uniquely identify a network interface card (NIC)

7. How many bits are used for a MAC address? (A) 16 bits (B) 32 bits (C) 48 bits (D) 64 bits
Answer: (C) 48 bits
8. What is the IEEE standard for MAC addresses? (A) IEEE 802.3 (B) IEEE 802.11 (C) IEEE 802.15 (D) IEEE
802.1
Answer: (A) IEEE 802.3

9. Which transmission media type is immune to electromagnetic interference and has high data transfer
rates? (A) Coaxial cable (B) Twisted pair cable (C) Fiber optic cable (D) Wireless transmission
Answer: (C) Fiber optic cable

10. Which transmission media type is commonly used in Ethernet networks and consists of twisted pairs
of copper wires? (A) Coaxial cable (B) Twisted pair cable (C) Fiber optic cable (D) Wireless
transmission
Answer: (B) Twisted pair cable

11. What is the maximum data transfer rate of Category 6 Ethernet twisted pair cable? (A) 100 Mbps (B)
1 Gbps (C) 10 Gbps (D) 100 Gbps
Answer: (C) 10 Gbps
12. Which transmission media type is commonly used for cable television and broadband Internet
access? (A) Coaxial cable (B) Twisted pair cable (C) Fiber optic cable (D) Wireless transmission
Answer: (A) Coaxial cable

13. What is the range of frequencies used for transmission over coaxial cable? (A) Low frequency (B)
Medium frequency (C) High frequency (D) Variable frequency
Answer: (C) High frequency

14. Which transmission media type is susceptible to electromagnetic interference and signal degradation
over long distances? (A) Coaxial cable (B) Twisted pair cable (C) Fiber optic cable (D) Wireless
transmission
Answer: (B) Twisted pair cable

15. What type of transmission media is used for wireless communication? (A) Coaxial cable (B) Twisted
pair cable (C) Fiber optic cable (D) Electromagnetic waves
Answer: (D) Electromagnetic waves

1. Accumulator:
1. What is the purpose of an accumulator in a CPU?
 (A) Store memory addresses
 (B) Store intermediate results of arithmetic and logic operations
 (C) Control the flow of instructions
 (D) Handle input/output operations
Answer: (B) Store intermediate results of arithmetic and logic operations

2. Which type of register is typically used as an accumulator?


 (A) Special purpose register
 (B) General-purpose register
 (C) Memory address register
 (D) Instruction register
Answer: (A) Special purpose register

2. Bus Structure:
3. What is the purpose of a bus in a computer system?
 (A) To store data temporarily
 (B) To provide a communication pathway between different components
 (C) To perform arithmetic and logic operations
 (D) To control the flow of instructions
Answer: (B) To provide a communication pathway between different components
4. Which type of bus connects the CPU to main memory?
 (A) Address bus
 (B) Control bus
 (C) Data bus
 (D) Instruction bus
Answer: (C) Data bus

3. ALU (Arithmetic Logic Unit):


5. What is the primary function of the ALU in a CPU?
 (A) Manage memory operations
 (B) Execute arithmetic and logic operations
 (C) Control the flow of instructions
 (D) Handle input/output operations
Answer: (B) Execute arithmetic and logic operations

6. Which arithmetic operation is NOT typically performed by an ALU?


 (A) Addition
 (B) Multiplication
 (C) Subtraction
 (D) Division
Answer: (D) Division
4. Instruction Cycle:
5.
7. What is the first step in the instruction cycle?
 (A) Execute
 (B) Fetch
 (C) Decode
 (D) Store
Answer: (B) Fetch

8. Which component is responsible for fetching instructions from memory during the
instruction cycle?
 (A) ALU
 (B) Control Unit
 (C) Accumulator
 (D) Memory Address Register
Answer: (B) Control Unit

6. Control Unit:
9. What is the primary function of the control unit in a CPU?
 (A) Execute arithmetic and logic operations
 (B) Manage memory operations
 (C) Control the flow of instructions
 (D) Handle input/output operations
Answer: (C) Control the flow of instructions

10. Which component interprets the instructions fetched from memory during the instruction
cycle?
 (A) ALU
 (B) Control Unit
 (C) Accumulator
 (D) Memory Address Register
Answer: (B) Control Unit

1. What is Direct Memory Access (DMA) used for? (A) To access data directly from memory without
involving the CPU (B) To perform arithmetic and logical operations (C) To handle interrupts in a
system (D) To manage memory allocation for processes
Answer: (A) To access data directly from memory without involving the CPU

2. Which device is responsible for controlling the DMA operations? (A) CPU (B) Control Unit (C) DMA
Controller (D) ALU
Answer: (C) DMA Controller

3. DMA is commonly used for: (A) Data transfer between CPU and memory (B) Data transfer between
I/O devices and memory (C) Data transfer between CPU and cache memory (D) Data transfer
between cache memory and main memory
Answer: (B) Data transfer between I/O devices and memory

4. Which of the following statements about DMA is true? (A) DMA can only transfer data between CPU
and memory. (B) DMA transfers data using the CPU as an intermediary. (C) DMA allows I/O devices
to transfer data directly to/from memory. (D) DMA operations are slower compared to CPU-based
data transfers.
Answer: (C) DMA allows I/O devices to transfer data directly to/from memory.

5. Which mode of data transfer is more efficient: DMA or programmed I/O?


(A) DMA (B) Programmed I/O (C) Both are equally efficient (D) It depends on the specific application
Answer: (A) DMA
6. DMA reduces CPU overhead by: (A) Increasing CPU clock speed (B) Allowing the CPU to perform
other tasks while data transfer is in progress (C) Increasing the number of CPU cores (D) Adding
more cache memory to the CPU
Answer: (B) Allowing the CPU to perform other tasks while data transfer is in progress

7. What is an interrupt in computer architecture? (A) A signal generated by an I/O device to request
attention from the CPU (B) A type of CPU instruction (C) A mechanism to increase CPU speed (D) A
method for accessing data from memory
Answer: (A) A signal generated by an I/O device to request attention from the CPU

8. Which component handles interrupts in a computer system? (A) ALU (B) Control Unit (C) DMA
Controller (D) Interrupt Controller
Answer: (D) Interrupt Controller

9. Which of the following is NOT a type of interrupt? (A) Hardware interrupt (B) Software interrupt (C)
External interrupt (D) Internal interrupt
Answer: (D) Internal interrupt

10. Which type of interrupt is generated by hardware devices? (A) Hardware interrupt (B) Software
interrupt (C) External interrupt (D) Internal interrupt
Answer: (A) Hardware interrupt

11. Which type of interrupt is generated by software instructions? (A) Hardware interrupt (B) Software
interrupt (C) External interrupt (D) Internal interrupt
Answer: (B) Software interrupt

12. What is the purpose of an interrupt vector? (A) To store the interrupt service routine address (B) To
prioritize interrupts (C) To handle multiple interrupts simultaneously (D) To mask interrupts
Answer: (A) To store the interrupt service routine address

13. What happens when an interrupt occurs during the execution of a CPU instruction? (A) The CPU
ignores the interrupt until the instruction completes. (B) The CPU saves the current state and
transfers control to the interrupt handler. (C) The CPU continues executing the instruction and
processes the interrupt later. (D) The CPU halts execution until the interrupt is acknowledged.
Answer: (B) The CPU saves the current state and transfers control to the interrupt handler.
14. Which of the following is NOT a benefit of interrupt-driven I/O? (A) Reduced CPU overhead (B)
Improved system performance (C) Simplified I/O device management (D) Increased data transfer
speed
Answer: (D) Increased data transfer speed

15. What is the primary disadvantage of interrupt-driven I/O? (A) Increased CPU overhead (B) Reduced
system responsiveness (C) Complexity in managing interrupt handling (D) Inability to handle multiple
interrupts
Answer: (C) Complexity in managing interrupt handling

You might also like