Net Peper
Net Peper
Discrete Structures
Q1: What is the chromatic number of a complete bipartite graph K3,3K3,3?
a) 2
b) 3
c) 4
d) 5
Answer: a) 2
Explanation: A bipartite graph can be colored with 2 colors such that no two
adjacent vertices share the same color.
Q2: Which of the following is a tautology?
a) P→(Q→P)P→(Q→P)
b) P→¬PP→¬P
c) P∧¬PP∧¬P
d) P→QP→Q
Answer: a) P→(Q→P)P→(Q→P)
Explanation: This is equivalent to P→(¬Q∨P)P→(¬Q∨P), which is always true.
2. Computer Networks
Q3: In the TCP/IP model, which layer corresponds to the OSI model's Transport
Layer?
a) Internet Layer
b) Application Layer
c) Host-to-Host Layer
d) Network Access Layer
Answer: c) Host-to-Host Layer
Explanation: The Host-to-Host Layer in TCP/IP handles functions like flow control
and error correction, similar to the OSI Transport Layer.
Q4: What is the maximum data rate of a noiseless 4 kHz channel using 8 bits per
sample?
a) 8 kbps
b) 16 kbps
c) 32 kbps
d) 64 kbps
Answer: d) 64 kbps
Explanation: By Nyquist theorem: 2×4000×8=64,0002×4000×8=64,000 bps.
3. DBMS
Q5: Which ACID property ensures that transactions are executed completely or
not at all?
a) Atomicity
b) Consistency
c) Isolation
d) Durability
Answer: a) Atomicity
Explanation: Atomicity guarantees that a transaction is treated as a single,
indivisible unit.
Q6: In SQL, which clause is used to eliminate duplicate rows?
a) DISTINCT
b) UNIQUE
c) GROUP BY
d) HAVING
Answer: a) DISTINCT
Explanation: The SELECT DISTINCT clause removes duplicate records from the
result set.
4. Algorithms
Q7: Which algorithm uses the "divide and conquer" strategy?
a) Bubble Sort
b) Quick Sort
c) Insertion Sort
d) Selection Sort
Answer: b) Quick Sort
Explanation: Quick Sort divides the array into partitions and recursively sorts
them.
Q8: What is the time complexity of the Floyd-Warshall algorithm for finding all-
pairs shortest paths?
a) O(V3)O(V3)
b) O(V2)O(V2)
c) O(VlogV)O(VlogV)
d) O(ElogV)O(ElogV)
Answer: a) O(V3)O(V3)
Explanation: It uses three nested loops over the number of vertices VV.
5. Operating Systems
Q9: Which page replacement algorithm suffers from Belady’s Anomaly?
a) FIFO
b) LRU
c) Optimal
d) MRU
Answer: a) FIFO
Explanation: Increasing the number of frames in FIFO can sometimes increase
page faults.
Q10: What is the primary role of the "scheduler" in an OS?
a) Manage I/O operations
b) Allocate CPU time to processes
c) Handle memory allocation
d) Manage file systems
Answer: b) Allocate CPU time to processes
6. Theory of Computation
Q11: Which grammar is used to describe the syntax of programming languages?
a) Regular Grammar
b) Context-Free Grammar
c) Context-Sensitive Grammar
d) Unrestricted Grammar
Answer: b) Context-Free Grammar
Explanation: CFGs are used in parsers (e.g., BNF notation).
Q12: Which problem is undecidable?
a) Halting Problem
b) Sorting
c) Matrix Multiplication
d) Shortest Path
Answer: a) Halting Problem
Explanation: Turing proved no algorithm can solve the Halting Problem for all
inputs.
7. Software Engineering
Q13: Which testing focuses on internal logic of code?
a) Black-box Testing
b) White-box Testing
c) Regression Testing
d) Alpha Testing
Answer: b) White-box Testing
Explanation: It tests internal structures like loops and branches.
Q14: In Agile methodology, what is a "sprint"?
a) A fixed time period for task completion
b) A type of software bug
c) A testing phase
d) A documentation process
Answer: a) A fixed time period for task completion
8. Artificial Intelligence
Q15: Which algorithm uses a minimax strategy?
a) A*
b) Alpha-Beta Pruning
c) K-Means
d) Q-Learning
Answer: b) Alpha-Beta Pruning
Explanation: It optimizes the minimax algorithm by pruning branches in game
trees.
Q16: What is the heuristic function in Hill Climbing?
a) Cost so far
b) Estimated cost to the goal
c) Path length
d) Random value
Answer: b) Estimated cost to the goal
9. Web Technologies
Q17: Which tag is used to embed JavaScript in HTML?
a) <script>
b) <js>
c) <javascript>
d) <code>
Answer: a) <script>
Q18: What does REST stand for?
a) Representational State Transfer
b) Remote State Transfer
c) Resource State Transfer
d) Rapid State Transfer
Answer: a) Representational State Transfer
1. OSI Model
Q1: Which layer of the OSI model is responsible for end-to-end
communication and error recovery?
a) Network
b) Transport
c) Data Link
d) Session
Answer: b) Transport
Explanation:
The Transport layer (Layer 4) ensures reliable data transfer between
devices (e.g., TCP).
Functions include segmentation, flow control, and error correction.
Incorrect Options: Network layer handles routing (Layer 3); Data Link
manages MAC addressing (Layer 2); Session manages dialogues (Layer 5).
2. Protocols
Q2: Which protocol is connectionless and used for real-time applications like
video streaming?
a) TCP
b) FTP
c) UDP
d) HTTP
Answer: c) UDP
Explanation:
UDP (User Datagram Protocol) is connectionless, fast, and ideal for real-
time traffic.
Incorrect Options: TCP is connection-oriented; FTP/HTTP are application-
layer protocols.
3. IP Addressing
Q3: What is the network address of a host with IP 192.168.1.15/28?
a) 192.168.1.0
b) 192.168.1.16
c) 192.168.1.15
d) 192.168.1.32
Answer: a) 192.168.1.0
Explanation:
Subnet mask /28 = 255.255.255.240.
Block size = 256−240=16256−240=16.
The network address is the first IP in the subnet (192.168.1.0).
4. Subnetting
Q4: How many subnets are created with a subnet mask of 255.255.255.224 for
a Class C network?
a) 2
b) 6
c) 8
d) 16
Answer: c) 8
Explanation:
Class C default mask: 255.255.255.0.
Subnet bits = 224−0=224224−0=224 → Binary: 11100000 (3 bits).
Subnets = 23=823=8.
5. Routing
Q5: Which routing protocol uses the Bellman-Ford algorithm?
a) OSPF
b) RIP
c) BGP
d) EIGRP
Answer: b) RIP
Explanation:
RIP (Routing Information Protocol) uses hop count and Bellman-Ford for
path calculation.
Incorrect Options: OSPF uses Dijkstra; BGP is path-vector.
6. Network Devices
Q6: A switch operates at which OSI layer?
a) Physical
b) Data Link
c) Network
d) Transport
Answer: b) Data Link
Explanation:
Switches use MAC addresses (Layer 2) to forward frames.
Incorrect Options: Routers operate at Layer 3 (Network).
7. Wireless Networks
Q7: Which IEEE standard defines Wi-Fi 6?
a) 802.11ac
b) 802.11n
c) 802.11ax
d) 802.11g
Answer: c) 802.11ax
Explanation:
Wi-Fi 6 (802.11ax) supports higher throughput and efficiency in dense
environments.
8. Security
Q8: Which protocol provides secure web browsing?
a) HTTP
b) FTP
c) HTTPS
d) SMTP
Answer: c) HTTPS
Explanation:
HTTPS (HTTP + SSL/TLS) encrypts data between client and server.
9. Error Detection
Q9: Which method uses polynomial division for error detection?
a) Checksum
b) CRC
c) Parity
d) Hamming Code
Answer: b) CRC
Explanation:
CRC (Cyclic Redundancy Check) generates a checksum via polynomial
division.
13. DHCP
Q13: What is the primary role of DHCP?
a) Resolve domain names
b) Assign dynamic IP addresses
c) Encrypt data
d) Detect errors
Answer: b) Assign dynamic IP addresses
Explanation:
DHCP (Dynamic Host Configuration Protocol) automates IP assignment.
14. Firewalls
Q14: A stateful firewall operates at which layer(s)?
a) Network
b) Transport
c) Application
d) All of the above
Answer: d) All of the above
Explanation:
Stateful firewalls track active connections and operate across multiple OSI
layers.
15. IPv6
Q15: Which IPv6 address type is used for link-local communication?
a) Unicast
b) Multicast
c) Anycast
d) FE80::/10
Answer: d) FE80::/10
Explanation:
IPv6 link-local addresses start with FE80::/10 and are used for local
network communication.
16. ARP
Q16: What does ARP resolve?
a) IP to MAC
b) MAC to IP
c) Domain to IP
d) IP to Hostname
Answer: a) IP to MAC
Explanation:
ARP (Address Resolution Protocol) maps IP addresses to MAC addresses.
17. VLAN
Q17: What is the purpose of a VLAN?
a) Divide a network into subnets
b) Create separate broadcast domains
c) Encrypt network traffic
d) Assign IP addresses
Answer: b) Create separate broadcast domains
Explanation:
VLANs (Virtual LANs) segment networks logically, reducing broadcast
traffic.
2. Network Devices
4. Q: Which device operates at the Data Link layer?
a) Hub
b) Switch
c) Router
d) Repeater
Answer: b) Switch
Explanation: Switches use MAC addresses (Layer 2).
5. Q: A device that connects two dissimilar networks is a:
a) Bridge
b) Gateway
c) Router
d) Repeater
Answer: b) Gateway
Explanation: Gateways translate protocols between different networks.
5. Routing
11.Q: Which routing protocol uses the Dijkstra algorithm?
a) RIP
b) OSPF
c) BGP
d) EIGRP
Answer: b) OSPF
Explanation: OSPF uses the Shortest Path First (Dijkstra) algorithm.
12.Q: What metric does RIP use?
a) Hop count
b) Bandwidth
c) Delay
d) Cost
Answer: a) Hop count
6. Network Security
13.Q: Which protocol provides secure remote login?
a) FTP
b) SSH
c) Telnet
d) HTTP
Answer: b) SSH
Explanation: SSH encrypts remote terminal sessions.
14.Q: A firewall operates at which OSI layer(s)?
a) Network
b) Transport
c) Application
d) All of the above
Answer: d) All of the above
Explanation: Modern firewalls work at multiple layers.
7. Wireless Networks
15.Q: Which IEEE standard defines Wi-Fi 6?
a) 802.11ac
b) 802.11n
c) 802.11ax
d) 802.11g
Answer: c) 802.11ax
16.Q: Bluetooth uses which frequency band?
a) 2.4 GHz
b) 5 GHz
c) 900 MHz
d) 60 GHz
Answer: a) 2.4 GHz
8. Network Topologies
17.Q: Which topology is most fault-tolerant?
a) Bus
b) Star
c) Mesh
d) Ring
Answer: c) Mesh
Explanation: Multiple paths ensure redundancy.
10. Miscellaneous
19.Q: What does ARP resolve?
a) IP to MAC address
b) MAC to IP address
c) Domain name to IP
d) IP to hostname
Answer: a) IP to MAC address
20.Q: Which protocol is used for email retrieval?
a) SMTP
b) IMAP
c) SNMP
d) HTTP
Answer: b) IMAP
1. Database Fundamentals
1. Q: The primary purpose of a DBMS is to:
a) Store data
b) Provide data abstraction and independence
c) Create backups
d) Generate reports
Answer: b)
Explanation: DBMS ensures logical and physical data independence,
hiding storage details from users.
2. Q: Which data model uses "tables" to represent data?
a) Hierarchical
b) Network
c) Relational
d) Object-oriented
Answer: c)
Explanation: Relational models organize data into rows and columns
(relations).
3. Relational Algebra
5. Q: Which operation combines two relations vertically?
a) Join
b) Union
c) Intersection
d) Projection
Answer: b)
Explanation: Union appends rows from two relations with the same
schema.
6. Q: The symbol "σ" in relational algebra denotes:
a) Projection
b) Selection
c) Join
d) Rename
Answer: b)
Explanation: σ (sigma) selects rows based on a condition.
4. SQL
7. Q: Which SQL clause filters groups after aggregation?
a) WHERE
b) HAVING
c) GROUP BY
d) ORDER BY
Answer: b)
Explanation: HAVING filters groups created by GROUP BY,
while WHERE filters rows.
8. Q: What does ON DELETE CASCADE enforce?
a) Prevents deletion
b) Deletes referencing rows
c) Sets NULL in referencing rows
d) Rolls back the transaction
Answer: b)
Explanation: It automatically deletes dependent rows in child tables.
5. Normalization
9. Q: A relation is in 2NF if it is in 1NF and:
a) No partial dependencies
b) No partial dependencies on the primary key
c) No transitive dependencies
d) All attributes are atomic
Answer: b)
Explanation: 2NF eliminates partial dependencies (non-prime attributes
depend on the full primary key).
10.Q: Which normal form eliminates transitive dependencies?
a) 1NF
b) 2NF
c) 3NF
d) BCNF
Answer: c)
Explanation: 3NF removes non-key attributes dependent on other non-
key attributes.
8. Concurrency Control
15.Q: In Two-Phase Locking (2PL), the phase where locks are released is:
a) Growing phase
b) Shrinking phase
c) Commit phase
d) Abort phase
Answer: b)
Explanation: Locks are acquired in the growing phase and released in the
shrinking phase.
16.Q: Which timestamp-based method ensures serializability?
a) Lock-based
b) Thomas Write Rule
c) Strict 2PL
d) Wait-Die
Answer: b)
Explanation: Thomas Write Rule ignores outdated writes to maintain
serializability.
9. Advanced Topics
17.Q: In a distributed database, horizontal fragmentation splits a table by:
a) Columns
b) Rows
c) Both
d) Nodes
Answer: b)
Explanation: Horizontal fragmentation divides rows (e.g., by region).
18.Q: CAP theorem states that a distributed system cannot simultaneously
guarantee:
a) Consistency, Availability, Partition tolerance
b) Consistency, Accuracy, Performance
c) Concurrency, Atomicity, Durability
d) None of the above
Answer: a)
Explanation: CAP theorem highlights trade-offs in distributed systems.