Q61. What is the total number of subnets created by applying a /27 subnet mask to a Class C IP address?
Why: A Class C network default mask is /24. A /27 mask borrows 3 subnet bits (27 - 24 = 3). Total subnets = 2³ = 8 subnets.
Q62. How many usable host IP addresses are available per subnet in a /28 IPv4 subnet configuration?
Why: For a /28 mask, host bits = 32 - 28 = 4 bits. Total IP addresses = 2⁴ = 16. Usable host IPs = 2⁴ - 2 (subtract Network & Broadcast ID) = 14.
Q63. In Banker's Algorithm for deadlock avoidance, if Need[i][j] <= Available[j], what state is guaranteed?
Why: Banker's Algorithm tests if allocating requested resources leaves the system in a Safe State where all processes can execute sequentially without deadlock.
Q64. What are Coffman's four necessary conditions for a deadlock to occur in an operating system?
Why: Deadlock can occur if and only if all 4 Coffman conditions hold simultaneously: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.
Q65. What is the theoretical maximum speedup ratio of a k-stage instruction pipeline operating over n instructions?
Why: Non-pipelined execution time = n * k cycles. Pipelined time = (k + n - 1) cycles. Speedup S = (n * k) / (k + n - 1). As n → ∞, S → k.
Q66. In direct-mapped cache architecture, if main memory has 4096 blocks and cache has 64 lines, which cache line does memory block 135 map to?
Why: Direct mapping formula: Cache Line Index = (Memory Block Number) MOD (Number of Cache Lines) = 135 MOD 64 = 7 (since 135 = 64 × 2 + 7).
Q67. In Boyce-Codd Normal Form (BCNF), for every non-trivial functional dependency X → Y, what constraint must X satisfy?
Why: BCNF is a stricter version of 3NF requiring that for every functional dependency X → Y, the determinant X MUST be a candidate/super key.
Q68. Which relational algebra operation returns tuples present in Relation R but absent in Relation S?
Why: Set Difference (R - S) filters out any tuples from relation R that also appear in relation S. Both relations must be union-compatible.
Q69. What is the worst-case time complexity of Dijkstra's algorithm for single-source shortest path using Min-Heap priority queue?
Why: Using a binary min-heap priority queue, extracting min node takes O(log V) and decreasing keys takes O(log V) per edge, yielding O((V + E) log V).
Q70. In a connected undirected graph G with V vertices and E edges, how many edges does its Minimum Spanning Tree (MST) contain?
Why: A Minimum Spanning Tree connects all V vertices of a graph without forming any cycles, which strictly requires exactly (V - 1) edges.
Q71. Which component of a compiler eliminates redundant computations and loop invariants to optimize execution speed?
Why: The Code Optimizer transforms intermediate code to run faster and consume less memory (e.g. dead code elimination, loop invariant code motion).
Q72. What parsing conflict occurs in an SLR(1) parsing table when a state contains both A → α.aβ and B → γ.?
Why: A Shift-Reduce conflict arises when the parser cannot decide whether to shift input token 'a' or reduce using rule B → γ.
Q73. Which software coupling type occurs when two modules share data via a global data structure?
Why: Common Coupling (Global Coupling) happens when multiple modules read and write to shared global variables or shared memory regions.
Q74. In software engineering cohesion classification, which cohesion type represents the strongest and most desirable module structure?
Why: Functional Cohesion is the highest/best form where all elements inside a module cooperate to perform a single well-defined task.
Q75. Which language class can be recognized by a Nondeterministic Pushdown Automaton (NPDA)?
Why: NPDA is the exact machine model corresponding to Context-Free Grammars (CFG) and Context-Free Languages (CFL).
Q76. What is the Halting Problem of Turing Machines classified as in Automata Theory?
Why: Proved by Alan Turing in 1936, no algorithm exists that can decide whether an arbitrary Turing machine will halt on a given input.
Q77. In C++, which keyword enables dynamic polymorphism and runtime late binding of member functions?
Why: The 'virtual' keyword creates a vtable pointer (vptr) that resolves overridden function calls dynamically at runtime based on the object's actual type.
Q78. In Java memory management, where are object instances allocated at runtime?
Why: In Java, all objects created via 'new' are dynamically allocated in Heap Memory, while local primitives and object reference variables reside on the Stack.
Q79. Which asymmetric key encryption algorithm relies on the mathematical difficulty of factoring large composite prime integers?
Why: RSA public-key cryptography bases its security on the hardness of prime factorization of a large composite number N = p * q.
Q80. What is the primary function of a counting semaphore S with initial value 3?
Why: A counting semaphore initialized to 3 allows up to 3 units of a shared resource to be used concurrently. Decrements on wait(), increments on signal().
Q81. In 8085 microprocessor architecture, what is the width of the Address Bus and Data Bus respectively?
Why: 8085 has a 16-bit address bus (can address up to 64 KB memory = 2¹⁶ bytes) and an 8-bit bidirectional data bus.
Q82. Which SQL command is used to grant specific privileges on database objects to database users?
Why: GRANT is a Data Control Language (DCL) command used to assign permissions (SELECT, INSERT, UPDATE, DELETE) to database roles/users.
Q83. What is the worst-case space complexity of Depth First Search (DFS) traversal on a graph with V vertices and maximum path depth h?
Why: DFS maintains a recursion stack proportional to the maximum depth h of the search tree/graph path.
Q84. Which compiler phase checks whether the source program construct conforms to programming language type rules?
Why: Semantic Analysis enforces type consistency (e.g. array index checking, variable declaration verification, type casting).
Q85. In Software Quality Assurance, what is the main goal of Integration Testing?
Why: Integration testing verifies functional compatibility and data flow across interfaces between combined program components.
Q86. Which ICMP message type is issued when an IP packet TTL (Time To Live) reaches zero?
Why: When a router decrements a packet's TTL to 0, it drops the packet and sends ICMP Type 11 (Time Exceeded) back to the sender (used by traceroute).
Q87. In Linux process management, what is a process called that has completed execution but still has an entry in the process table?
Why: A Zombie process is a terminated process whose exit status has not yet been read by its parent process using wait().
Q88. In memory hierarchy, which memory type provides the fastest data access speed to the CPU?
Why: CPU internal registers operate at CPU core clock speeds (< 1 ns), making them faster than L1 Cache, L2 Cache, and RAM.
Q89. Which index structure maintains balanced search trees where all leaf nodes are at the same depth and connected in a linked list?
Why: B+ Trees store all data pointers exclusively in leaf nodes, linked sequentially for extremely fast range queries in relational databases.
Q90. What is the tightest upper bound time complexity to solve the All-Pairs Shortest Path problem using the Floyd-Warshall algorithm?
Why: Floyd-Warshall dynamic programming uses 3 nested loops from 1 to V, resulting in an O(V³) time complexity.
Q91. Chomsky hierarchy places languages into 4 types (0, 1, 2, 3). Which automaton accepts Type-1 (Context-Sensitive) languages?
Why: Type-1 Context-Sensitive Languages are recognized by Linear Bounded Automata (nondeterministic Turing machines with bounded tape).
Q92. In C++, what is a Pure Virtual Function?
Why: A pure virtual function (`virtual void draw() = 0;`) makes the class abstract, forcing derived classes to provide concrete implementations.
Q93. Which protocol operates at the Application Layer to map IP addresses to domain names?
Why: DNS translates human-readable hostnames (e.g. lastdayprep.in) into numerical IP addresses (Application Layer, UDP/TCP port 53).
Q94. Which disk scheduling algorithm services requests by moving the head continuously from one end to the other, reversing direction at the edges?
Why: SCAN algorithm (Elevator Algorithm) moves disk arm back and forth across tracks, servicing requests along the way.
Q95. In computer architecture, what is a structural hazard in instruction pipelining?
Why: Structural hazards happen when two pipeline stages attempt to access the same physical hardware resource (e.g. single memory port for instruction & data).
Q96. What is the output of the SQL query 'SELECT COUNT(*) FROM Employee;' if table Employee has 10 rows and 2 NULL values in salary?
Why: COUNT(*) counts ALL rows regardless of NULL values in individual columns. COUNT(salary) would return 8.
Q97. Which self-balancing binary search tree maintains a black-height balance property across all paths?
Why: A Red-Black tree ensures that every path from root to leaf contains the exact same number of black nodes (black-height).
Q98. In Agile development, what is a User Story?
Why: User Stories use the format 'As a [user], I want [feature] so that [benefit]' to capture end-user functional requirements.
Q99. In compiler design, what is an Abstract Syntax Tree (AST)?
Why: AST abstracts away concrete syntax details (commas, parens) keeping only essential operators and operands as tree nodes.
Q100. If L1 is a Regular Language and L2 is a Context-Free Language, what is the language class of (L1 ∩ L2)?
Why: The intersection of a Context-Free Language with a Regular Language is ALWAYS a Context-Free Language.
Q101. In computer network security, what attack prevention role does a Stateful Inspection Firewall perform?
Why: Stateful firewalls maintain a state table monitoring full handshake contexts and open TCP/UDP sessions.
Q102. In demand paging virtual memory, what is thrashing?
Why: Thrashing occurs when the process degree of multiprogramming is too high, causing continuous page fault handling and CPU starvation.
Q103. Which addressing mode is used in instructions like 'MOV AX, [BX + SI + 4]'?
Why: Effective Address = Base Register (BX) + Index Register (SI) + Displacement constant (4).
Q104. In an Entity-Relationship (ER) diagram, how is a Weak Entity set represented visually?
Why: In ER notation: Weak Entity = Double Rectangle, Identifying Relationship = Double Diamond, Multivalued Attribute = Double Ellipse.
Q105. What is the worst-case space complexity of storing a sparse graph with V vertices and E edges using an Adjacency List?
Why: Adjacency List requires V array pointer slots + 2E linked list nodes for undirected graph, resulting in optimal O(V + E) space.
Q106. Which C++ feature prevents implicit conversion of single-argument constructor parameters during function calls?
Why: Prefixing a constructor with `explicit` disables automatic type coercions by the compiler (e.g. `explicit Complex(double r)`).
Q107. Which software maintenance classification involves modifying a software system to keep it usable in a changed operating environment?
Why: Adaptive maintenance adjusts software to external environmental changes (e.g. new OS version, hardware upgrade, database migration).
Q108. What is a Basic Block in compiler code optimization?
Why: A basic block is a straight-line code sequence with no branches in except at the entry and no branches out except at the exit.
Q109. Which of the following problems is Turing Decidable?
Why: Determining whether a DFA accepts any string (emptiness) is decidable in linear time via graph reachability from start state to final state.
Q110. In the OSI model, which layer is responsible for end-to-end flow control, error recovery, and multiplexing?
Why: The Transport Layer (TCP/UDP) manages end-to-end process communication, flow control (sliding window), and segment sequencing.
Q111. What is Peterson's Solution designed to solve in Concurrent Programming?
Why: Peterson's algorithm is a software-based solution ensuring Mutual Exclusion, Progress, and Bounded Waiting for 2 concurrent processes.
Q112. What is the function of the Program Counter (PC) register in a CPU?
Why: The Program Counter (PC) automatically increments after fetching an instruction to point to the subsequent instruction in memory.
Q113. In SQL, which clause filters aggregated group results produced by GROUP BY?
Why: WHERE filters individual rows BEFORE grouping. HAVING filters aggregated groups AFTER GROUP BY execution.
Q114. What is the maximum number of nodes in a Binary Tree of height h (where height of root node is 0)?
Why: Sum of nodes at levels 0 to h = 2⁰ + 2¹ + ... + 2ʰ = 2^(h+1) - 1.
Q115. In Object-Oriented Design, what principle does the SOLID acronym's 'S' represent?
Why: Single Responsibility Principle states that a class should have one, and only one, reason to change.
Q116. Which Software Development Life Cycle (SDLC) model is best suited for projects with high risk and evolving requirements?
Why: The Spiral Model incorporates iterative prototyping alongside explicit risk analysis at every phase.
Q117. What is Left Factoring used for in Context-Free Grammars?
Why: Left factoring rewrites productions with shared prefixes (e.g. A → αβ1 | αβ2) into A → αA', A' → β1 | β2, making the grammar suitable for top-down LL(1) parsers.
Q118. Which machine model corresponds to Context-Sensitive Grammars (CSG) in the Chomsky Hierarchy?
Why: Linear Bounded Automaton (LBA) is a restricted form of Turing Machine whose tape head cannot move beyond the portion of tape containing the input string.
Q119. In the TCP/IP protocol suite, which protocol resolves a known 32-bit IP address to a physical 48-bit MAC address?
Why: ARP broadcasts a query 'Who has IP X.X.X.X?' on the local Ethernet segment to discover the target node's physical MAC address.
Q120. In operating systems memory management, what is internal fragmentation?
Why: Internal fragmentation occurs when a process is assigned a fixed memory block (e.g. 4KB page) larger than its actual data requirements, leaving unused padding space inside.