Important Question
Important Question
Important Question
2. (A) Central Processing Unit (B) Computer Processing Unit (C) Control Processing Unit (D)
Centralized Processing Unit
Answer: (A) Central Processing Unit
Data Structures:
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:
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
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
22. Which protocol is used for sending emails over the internet? (A) FTP (B) SMTP (C) HTTP
(D) POP3
Answer: (B) SMTP
4. What is the binary equivalent of the decimal number 10? (A) 1010
(B) 0001 (Answer) (C) 1100
(D) 0100
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
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
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>
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);
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
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
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
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
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.
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.
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
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
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
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)
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
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
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
pen_spark
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
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)
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
(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.
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
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
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
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. 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
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.
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