9718856466,9990657855

eiidelhi@gmail.com

GATE 2026 Important Questions in Computer Science & Engineering – CSE

GATE 2026 Important Questions in Computer Science & Engineering – CSE Welcome to EII - Your Gateway to Success!

Prepare for GATE 2026 with confidence using a handpicked set of important questions in Computer Science & Engineering (CSE), crafted by the expert faculty of Engineers Institute of India (EII). Renowned for its focused and high-quality coaching in CSE, EII is committed to helping you achieve excellence in the upcoming GATE exam.

General Aptitude-Based on GATE Pattern
TYPE : MCQ ( Q.1 to Q.5 Carrying 1 Mark each)

Q.1 Which word completes the analogy "Fish is to Shoal as Lion is to _______"?

  • (A) Pride
  • (B) School
  • (C) Forest
  • (D) Series

Answer: (A)

Explanation:

Analogies are based on relationships between pairs of words, so we need to determine the specific relationship and apply it consistently.

Step 1: Analyze the Relationship

  • Fish and Shoal: A "shoal" is a collective noun for a group of fish that swim together loosely. It describes the social grouping of fish in their natural behavior.
  • The relationship is: Fish (individual animal) is part of a Shoal (the collective group of that animal).

Step 2: Apply the Relationship to Lion

  • Lion: We need the collective noun that represents a group of lions, similar to how a shoal represents a group of fish.
  • Lions are known to live and hunt in social groups. The standard collective noun for a group of lions is a pride.
  • Pride: A pride is the correct collective noun for a group of lions, directly analogous to a shoal for fish. Lions form prides, just as fish form shoals.

Q.2 Which sentence is grammatically correct?

  • (A) It is I who am responsible for this fiasco.
  • (B) It is myself who is responsible for this fiasco.
  • (C) It is I who is responsible for this fiasco.
  • (D) It is I who are responsible for this fiasco.

Answer: (A)

Explanation:

A - "It is I who am responsible" translates to "I am the one who am responsible," which is grammatically consistent:

  • I matches the subjective case.
  • am in "who am" agrees with I.

Other options fail:

  • B - misuses myself and has is (wrong person).
  • C - has is (wrong person for I).
  • D - has are (wrong number/person for I).
Thus, only option-A adheres to standard English grammar rules for pronoun case and subject-verb agreement.

Q.3 Cars P and Q start from point X in Gurugram at 10 AM. Car P heads North at 25 km/h and travels continuously, while Car Q heads East at 30 km/h but stops after 1 hour. If both are equidistant from X at 11:30 AM, how many minutes did Car Q stop for?

  • (A) 10
  • (B) 12
  • (C) 15
  • (D) 18

Answer: (C)

Explanation:

Step 1: Distance by car P at 11:30 AM

  • Time: 10:00 AM to 11:30 AM = 1.5 hours.
  • Speed: 25 km/h.
  • Distance: 25 × 1.5 = 37.5 km.

Step 2: Distance by car Q

  • Q travels 1 hour (10:00–11:00 AM) at 30 km/h = 30 km.
  • Q stops from 11:00 AM to 11:00 AM + t t t.
  • At 11:30 AM, Q’s distance must equal P’s = 37.5 km.

Step 3: Calculate Q’s travel time

  • To cover 37.5 km at 30 km/h:
  • Time: 37.5 ÷ 30 = 1.25 hours (1 hour 15 minutes).
  • Q travels until: 11:15 AM (10:00 AM + 1.25 hours).

Step 4: Find stoppage time

  • Q stops from: 11:15 AM to 11:30 AM.
  • Stoppage: 11:30 AM – 11:15 AM = 15 minutes.
So, Car Q stopped for 15 minutes.

Q.4 Which statement is NOT true for all real 𝑥 regarding floor and ceiling functions?

  • (A) ⌈𝑥⌉ ≥ 𝑥
  • (B) ⌊𝑥⌋ ≤ 𝑥
  • (C) ⌈𝑥⌉ ≥ ⌊𝑥⌋
  • (D) ⌊𝑥⌋ + 1 = ⌈𝑥⌉

Answer: (D)

Explanation:

The ceiling function ⌈x⌉ is the smallest integer ≥ x, and the floor function ⌊x⌋ is the largest integer ≤ x. We need to identify a statement that’s NOT true for all real x.

Common statement to test: ⌊x⌋ + 1 = ⌈x⌉

For x = 2.3:

  • ⌊2.3⌋ = 2, 2 + 1 = 3.
  • ⌈2.3⌉ = 3, true.

For x = 2:

  • ⌊2⌋ = 2, 2 + 1 = 3.
  • ⌈2⌉ = 2, false.
Since it fails when x is an integer, it’s NOT true for all x.

The statement ⌊x⌋ + 1 = ⌈x⌉ is NOT correct for all x.

Q.5 P and Q play chess. P wins 80%, draws 15%, and loses 5%. If they play 3 more matches, what is the probability that P wins exactly 2?

  • (A) 48/125
  • (B) 16/125
  • (C) 16/25
  • (D) 25/48

Answer: (A)

Explanation:

To find the probability that P wins exactly 2 of 3 chess matches against Q, given P's win rate is 80%, draw rate is 15%, and loss rate is 5%, we use the binomial probability formula. The outcomes are win, draw, or loss, but the question asks for the probability of exactly 2 wins, so we focus on wins versus non-wins.

Q.6 Select the most logical sentence sequence to form a paragraph.

P. At once, without thinking much, people rushed towards the city in hordes with the sole aim of grabbing as much gold as they could.

Q. However, little did they realize about the impending hardships they would have to face on their way to the city: miles of mud, unfriendly forests, hungry beasts and inimical local lords – all of which would reduce their chances of getting gold to almost zero.

R. All of them thought that easily they could lay their hands on gold and become wealthy overnight.

S. About a hundred years ago, the news that gold had been discovered in Kolar spread like wildfire and the whole State was in raptures.

  • (A) P → Q → R → S
  • (B) Q → S → R → P
  • (C) S → Q → P → R
  • (D) S → P → R → Q

Answer: (D)

Explanation:

Step 1: Analyze Sentence Connections

  • S sets the scene by introducing the gold discovery and public excitement, making it a natural starting point.
  • P describes the immediate reaction—people rushing to the city—logically following the news of gold.
  • R explains the mindset behind the rush (belief in easy wealth), which aligns with why people acted impulsively in P.
  • Q introduces the reality check—hardships that people didn't foresee—serving as a consequence or twist after the optimism in P and R.

Sequence and Flow

  • Sequence: Gold discovered, excitement spreads (S); people rush to the city (P); they believe they’ll get rich easily (R); but face unforeseen hardships (Q).
  • Flow: S introduces the event, P shows the action, R explains the motivation, and Q provides the consequence (hardships). Logical and cohesive.
The sequence S → P → R → Q creates a logical and cohesive flow in the narrative.

Q.7 If HIDE → 19-23-7-11 and CAGE → 5-2-17-11, what is the code for HIGH?

  • (A) 5-17-1-2
  • (B) 17-19-13-17
  • (C) 13-3-1-2
  • (D) 19-23-17-19

Answer: (D)

Explanation:

HIDE → 19-23-7-11

CAGE → 5-2-17-11

HIGH ⇒ 19-23-17-19

Q.8 A figure is reflected horizontally and then rotated 90° clockwise. Which is the resulting figure?

Answer: (Depends on actual figures shown)

Explanation:

Anti-clockwise figure

Reflection along horizontal line figure

Q.9 Arrange in increasing order of lines of symmetry: Isosceles triangle, Equilateral triangle, Square, Circle.

  • (A) Circle; Square; Equilateral triangle; Isosceles triangle
  • (B) Isosceles triangle; Equilateral triangle; Square; Circle
  • (C) Equilateral triangle; Isosceles triangle; Square; Circle
  • (D) Isosceles triangle; Square; Equilateral triangle; Circle

Answer: (B)

Explanation:

The Correct Sequence of Objects Based on Increasing Number of Mirror Lines (Lines of Symmetry)

  • Isosceles Triangle: It has 1 line of symmetry.
  • Equilateral Triangle: It has 3 lines of symmetry.
  • Square: It has 4 lines of symmetry.
  • Circle: It has infinite lines of symmetry, as any line passing through the center is a line of symmetry.

Q.10 A student has 0.8 and 0.6 probability of job offers from Company S and T respectively. What is the probability of getting both?

  • (A) 0 ≤ p ≤ 0.2
  • (B) 0.4 ≤ p ≤ 0.6
  • (C) 0.2 ≤ p ≤ 0.4
  • (D) 0.6 ≤ p ≤ 1.0

Answer: (B)

Explanation: P (S) = 0.8 P (T) = 0.6 P (S∩T) = P (S) . P (T) = (0.8) . (0.6) = 0.48

1. Which of the following Boolean expressions is equivalent to A⋅B + A‾⋅C?

(A) (A + B‾)⋅(A‾ + C)
(B) (A + B)⋅(A‾ + C)
(C) A⋅B + A‾⋅C‾
(D) A⋅B‾ + A‾⋅C
Answer: (B)
Explanation:

Using the consensus theorem or K-map, the expression A⋅B+A‾⋅C can be simplified. Alternatively, we can verify by constructing truth tables or algebraic manipulation. The expression (A+B)⋅(¯A+C) distributes to A⋅¯A+A⋅C+B⋅¯A+B⋅C
Since A⋅¯A=0, it simplifies A⋅C+B⋅¯A+B⋅C to Further simplification using K-map confirms it matches "A.B"+¯A⋅C.

2. A 4:1 multiplexer has how many select lines?

(A) 1
(B) 2
(C) 3
(D) 4
Answer: (B)
Explanation: A multiplexer with 2n inputs requires n select lines. For a 4:1 multiplexer ( 4=22 ), the number of select lines is 2.

3. The output of a 2-input XOR gate is 1 when the inputs are:

(A) Both 0
(B) Both 1
(C) One 0 and one 1
(D) None of the above
Answer: (C)
Explanation: The XOR gate outputs 1 when the inputs are different (i.e., one is 0 and the other is 1). Truth table:

4. The minimal sum-of-products form of the Boolean function F(A,B,C)=Σm(0,2,4,6) is:

Answer: (A)
Explanation: Using a K-map for minterms 0(000), 2(010), 4(100), 6(110), group the 1s:

5. In IEEE 754 single-precision floating-point format, the number of bits used for the exponent is:

(A) 7
(B) 8
(C) 9
(D) 10
Answer: (B)
Explanation: In IEEE 754 single-precision format, a floating-point number is represented with 32 bits: 1 bit for the sign, 8 bits for the exponent (biased), and 23 bits for the mantissa (fraction).

6. A full adder has how many outputs?

(A) 1
(B) 2
(C) 3
(D) 4
Answer: (B)
Explanation: IA full adder takes three inputs (A, B, and carry-in) and produces two outputs: the sum and the carry-out.

7. The binary equivalent of -13 in 6-bit 2’s complement form is:

(A) 110011
(B) 101101
(C) 110101
(D) 101011
Answer: (B)

Explanation: Convert 13 to binary: 13=1101 13 = 1101 13=1101. For 6-bit 2’s complement of -13:

8.

Answer: (A)
In a D flip-flop, the next state Qn+1 is equal to the input D at the clock edge, regardless of the current state Qn.

TYPE : MSQs (Multiple Select Questions)

9.

Answers: (A), (B), (C)
Explanation:

10.

Answers: (A), (B), (C)
Explanation:

TYPE : MCQ

11. In the Karnaugh Map (K-Map), adjacency refers to:

(A) Different variables
(B) Changing two variables
(C) One-variable change between terms
(D) All variables constant
Answer: (C)
Explanation: Adjacent cells differ by only one variable → used for simplification.

12. A multiplexer with n select lines can select from how many input lines?

(A) 2n
(B) n²
(C) n
(D) 2n−1
Answer: (A)
Explanation: n select lines give 2n inputs.

13. Which flip-flop is suitable for frequency division?

(A) SR
(B) D
(C) JK
(D) T
Answer: (D)
Explanation: T flip-flop toggles on every clock pulse, dividing frequency by 2.

14. Which of the following binary operations is associative?

(A) XOR
(B) NAND
(C) NOR
(D) None
Answer: (A)
Explanation: XOR is associative: (A ⊕ B) ⊕ C = A ⊕ (B ⊕ C).

15. In floating point representation, the mantissa is:

(A) The exponent part
(B) Always in integer form
(C) The fractional part
(D) The complete number
Answer: (C)
Explanation: Mantissa represents the precision or fractional part of the number.

16. Two's complement representation helps in:

(A) Faster memory access
(B) Floating point division
(C) Representing signed numbers
(D) Simplifying addition and subtraction
Answer: (D)
Explanation: Two’s complement simplifies binary arithmetic for both positive and negative numbers.

17. What is the minimum number of flip-flops needed to design a MOD-6 counter?

(A) 2
(B) 3
(C) 4
(D) 6
Answer: (B)
Explanation: 3 flip-flops provide 2³ = 8 states, which is enough for MOD-6.

18. The range of an 8-bit signed 2’s complement number is:

(A) –127 to +128
(B) –128 to +127
(C) 0 to 255
(D) –255 to +255
Answer: (B)
Explanation: For 8-bit 2’s complement: Range = –2⁷ to 2⁷–1 = –128 to +127.

TYPE : MSQs (Multiple Select Questions)

19. [MSQ] Which of the following circuits can be built using a multiplexer?

(A) Half adder
(B) Any logic function
(C) Comparator
(D) Priority encoder
Answers: (A), (B), (C)
Explanation: MUX can implement combinational logic including half adder and comparator, but not priority encoder directly.

20. [MSQ] Which of the following are true about D flip-flop?

(A) It has a single input
(B) It stores 1-bit of information
(C) It toggles on every clock
(D) It can be used in shift registers
Answers: (A), (B), (D)
Explanation: D flip-flop has one input, stores 1 bit, and is used in shift registers. T flip-flop toggles, not D.

TYPE: MCQ Theoretical

1. Which of the following addressing modes uses a constant value specified within the instruction?

(A) Direct addressing
(B) Immediate addressing
(C) Register addressing
Answer: (B)
Explanation: Immediate addressing mode includes the operand directly in the instruction. No memory access is needed.

2. The primary role of the control unit in a processor is to:

(A) Perform arithmetic operations
(B) Store program instructions
(C) Control the flow of data and instructions
(D) Transfer data to I/O devices
Answer: (C)
Explanation: The control unit generates control signals to manage instruction execution and data movement in the processor.

3. In a pipeline processor, a structural hazard occurs when:

(A) Data dependencies exist between instructions
(B) Branch instructions disrupt normal flow
(C) Two instructions require the same hardware resource simultaneously
(D) Pipeline stages take unequal time
Answer: (C)
Explanation: Structural hazards happen when hardware resources are insufficient for concurrent execution of instructions.

4. Which of the following is a characteristic of RISC architecture?

(A) Complex addressing modes
(B) Variable-length instructions
(C) More instructions per program
(D) Single-cycle instruction execution
Answer: (D)
Explanation: RISC aims for simple instructions with the goal of single-cycle execution, leading to efficient pipelining.

5. The number of bits required to address 1MB of memory with word size of 1 byte is:

(A) 10 bits
(B) 16 bits
(C) 20 bits
(D) 24 bits
Answer: (C)
Explanation: 1MB = 2²⁰ bytes → So, 20 bits are required to address every byte.

6. In instruction pipelining, which of the following hazards can be resolved using operand forwarding?

(A) Structural hazard
(B) Data hazard
(C) Control hazard
(D) Bus contention
Answer: (B)
Explanation: Operand forwarding (data forwarding) resolves data hazards by passing result values directly to subsequent stages.

7. Which memory is the fastest in the memory hierarchy?

(A) Main memory
(B) Cache memory
(C) Register
(D) Hard disk
Answer: (C)
Explanation: Registers are located within the CPU and provide the fastest access.

8. In DMA (Direct Memory Access), data is transferred:

(A) Through the processor
(B) Without involving memory
(C) Directly between I/O and memory
(D) From CPU to cache
Answer: (C)
Explanation: DMA enables data transfer directly between memory and I/O devices without CPU intervention.

9. The purpose of a pipeline in a processor is to:

(A) Save power
(B) Increase memory capacity
(C) Improve instruction throughput
(D) Reduce instruction latency
Answer: (C)
Explanation: Pipelining improves instruction throughput by overlapping execution of multiple instructions.

10. In a 5-stage pipeline, the number of clock cycles required to complete n instructions (ideal case) is:

(A) 5n
(B) n + 4
(C) 5 + n
(D) n × 4
Answer: (B)
Explanation: First instruction takes 5 cycles, each subsequent instruction finishes every cycle → n + 4.

11. Which of the following is NOT a type of pipeline hazard?

(A) Data hazard
(B) Structural hazard
(C) Logic hazard
(D) Control hazard
Answer: (C)
Explanation: Logic hazard is not a pipeline hazard. The three types are data, structural, and control.

12. Memory-mapped I/O uses:

(A) Separate address space for I/O
(B) Privileged mode access only
(C) Common address space for memory and I/O
(D) I/O mapped instruction set
Answer: (C)
Explanation: Memory-mapped I/O uses the same address space as memory.

13. What is the function of a control signal in a micro-programmed control unit?

(A) Manage main memory access
(B) Generate machine code
(C) Activate specific circuits in the datapath
(D) Select instruction formats
Answer: (C)
Explanation: Control signals are used to activate or enable certain datapath operations during instruction execution.

14. Which of the following best describes locality of reference?

(A) A method to reduce memory size
(B) Reuse of data and instructions within close proximity
(C) Pipelining optimization
(D) A cache replacement policy
Answer: (B)
Explanation: Locality of reference (spatial and temporal) explains why caches are effective.

15. A cache with block size of 4 words and total 64 blocks can store:

(A) 64 words
(B) 128 words
(C) 256 words
(D) 16 words
Answer: (C)
Explanation: Each block holds 4 words, so total = 4 × 64 = 256 words.

16. Which technique is used to reduce the miss penalty in cache memory?

(A) Write-back
(B) Victim cache
(C) Write-through
(D) Interleaving
Answer: (B)
Explanation: Victim cache holds recently evicted blocks to reduce miss penalty.

17. What is the key difference between interrupt and polling?

(A) Interrupts use hardware, polling uses software
(B) Polling is faster
(C) Interrupts are synchronous
(D) Polling is power efficient
Answer: (A)
Explanation: Interrupts are hardware-triggered events; polling involves checking device status via software.

18. A hard disk is an example of:

(A) Volatile memory
(B) Secondary storage
(C) Cache memory
(D) Primary storage
Answer: (B)
Explanation: Hard disks are non-volatile secondary storage devices.

TYPE : MSQs (Multiple Select Questions)

19. [MSQ] Which of the following are pipeline hazards in a processor?

(A) Data hazard
(B) Control hazard
(C) Register hazard
(D) Structural hazard
Answers: (A), (B), (D)
Explanation: Only (A), (B), and (D) are valid pipeline hazards. "Register hazard" is not a standard hazard type.

20. [MSQ] Which of the following are benefits of using cache memory?

(A) Reduced average memory access time
(B) Increased instruction execution time
(C) Increased locality of reference
(D) Improved CPU performance
Answers: (A), (D)
Explanation: Cache reduces memory latency, improving CPU performance. It doesn't increase locality; it exploits it.

TYPE : MCQ Theoretical

1. What is the output of the following C code?
int main() {
  int a = 5;
  printf("%d", a++ + ++a);
}

(A) 11
(B) 12
(C) 10
(D) Undefined behavior

Answer: (D)

Explanation: Modifying and accessing a more than once without a sequence point leads to undefined behavior.

2. What is the worst-case time complexity of searching in a Binary Search Tree?
(A) O(log n)
(B) O(n)
(C) O(n log n)
(D) O(1)

Answer: (B)

Explanation: In worst case, the tree may become skewed like a linked list.

3. What is the maximum number of nodes in a binary tree of height h?
(A) 2h
(B) 2h+1
(C) 2h+1 - 1
(D) 2h - 1

Answer: (C)

Explanation: Maximum nodes in binary tree = 2h+1 - 1

4. Which of the following is not a characteristic of a stack?
(A) LIFO
(B) Can be implemented using arrays
(C) FIFO
(D) Push and Pop operations

Answer: (C)

Explanation: FIFO is a queue property. Stack is LIFO.

5. In a min-heap, the smallest element is always located at:
(A) The root
(B) A leaf node
(C) The middle
(D) Rightmost node

Answer: (A)

Explanation: In min-heap, the root is always the smallest element.

6. Which data structure is used for BFS in a graph?
(A) Stack
(B) Queue
(C) Priority Queue
(D) Hash Table

Answer: (B)

Explanation: BFS uses a queue to explore nodes level-wise.

7. Which traversal of a binary search tree gives sorted order?
(A) Pre-order
(B) Post-order
(C) In-order
(D) Level-order

Answer: (C)

Explanation: In-order traversal of BST gives values in ascending order.

8. Which of the following is a valid base case for recursion?
(A) if(n == 1) return 1;
(B) return n * fact(n - 1);
(C) printf("Done");
(D) while(n > 0)

Answer: (A)

Explanation: Base case is the condition to terminate recursion.

9. In C, which operator is used to access value at a pointer address?
(A) &
(B) *
(C) ->
(D) %

Answer: (B)

Explanation: * is the dereference operator.

10. What is the output of the following?
char *str = "GATE";
printf("%c", *(str+2));

(A) G
(B) A
(C) T
(D) E

Answer: (C)

Explanation: Index 2 of "GATE" is 'T'.

11. Which data structure is best suited for implementing undo operations?
(A) Queue
(B) Stack
(C) Heap
(D) Graph

Answer: (B)

Explanation: Stack follows LIFO, which fits undo operations.

12. In a singly linked list, deletion of a node at the end requires:
(A) O(1) time
(B) O(n) time
(C) O(log n) time
(D) O(n²) time

Answer: (B)

Explanation: You need to traverse the list to the second last node.

13. Which of the following statements is true?
(A) Every binary tree is a binary search tree
(B) Every binary search tree is a binary tree
(C) All heaps are binary search trees
(D) A heap is a type of linked list

Answer: (B)

Explanation: BST is a type of binary tree with ordering property.

14. Which function is used to allocate memory dynamically in C?
(A) malloc
(B) alloc
(C) init
(D) create

Answer: (A)

Explanation: malloc() is used for dynamic memory allocation.

15. In an adjacency list representation of a graph with V vertices and E edges, total space required is:
(A) O(V + E)
(B) O(V²)
(C) O(E)
(D) O(V)

Answer: (A)

Explanation: Each vertex stores list of adjacent vertices → O(V + E)

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

Answer: (B)

Explanation: Insertion requires upheap or "bubble up" → O(log n)

17. In which case will a queue become full?
(A) front == rear
(B) rear == size - 1
(C) front == -1
(D) rear == front + 1

Answer: (B)

Explanation: In array-based queue, if rear reaches end, it's full.

18. Which sorting algorithm is best suited for nearly sorted data?
(A) Selection Sort
(B) Insertion Sort
(C) Bubble Sort
(D) Merge Sort

Answer: (B)

Explanation: Insertion sort performs well on nearly sorted input with O(n) time.

TYPE : MSQs (Multiple Select Questions)

19. (MSQ) Which of the following are recursive data structures?
(A) Linked List
(B) Stack
(C) Tree
(D) Graph

Answers: (A), (C), (D)

Explanation: Linked lists, trees, and graphs are recursive in structure. Stack is not recursively defined.

20. (MSQ) Which operations are allowed in an array-based queue implementation?
(A) Enqueue at front
(B) Dequeue from rear
(C) Enqueue at rear
(D) Dequeue from front

Answers: (C), (D)

Explanation: In standard queue: enqueue at rear, dequeue from front.

>

1. What is the time complexity of binary search in the worst case?
(A) O(1)
(B) O(n)
(C) O(log n)
(D) O(n log n)

Answer: (C)

Explanation: Binary search halves the search space in each step → O(log n)

2. Which sorting algorithm has the best average-case time complexity?
(A) Bubble Sort
(B) Merge Sort
(C) Insertion Sort
(D) Selection Sort

Answer: (B)

Explanation: Merge Sort has average-case time complexity of O(n log n)

3. In a hash table, what is the purpose of a collision resolution strategy?
(A) To sort elements
(B) To manage identical keys
(C) To handle two keys with the same hash index
(D) To remove duplicate keys

Answer: (C)

Explanation: Collision occurs when two keys map to the same index.

4. Which of the following is an asymptotic upper bound?
(A) Θ
(B) O
(C) Ω
(D) None

Answer: (B)

Explanation: Big-O provides the worst-case upper bound.

5. Which technique is used by Merge Sort?
(A) Greedy
(B) Dynamic Programming
(C) Backtracking
(D) Divide and Conquer

Answer: (D)

Explanation: Merge Sort splits the array, solves recursively, and merges.

6. What is the time complexity of Dijkstra’s algorithm using a binary heap?
(A) O(V²)
(B) O(V log V + E)
(C) O(V + E)
(D) O(E log V)

Answer: (B)

Explanation: Dijkstra with binary heap and adjacency list → O((V + E) log V)

7. In BFS, what data structure is used?
(A) Stack
(B) Queue
(C) Priority Queue
(D) Heap

Answer: (B)

Explanation: BFS uses queue for level-wise traversal.

8. Which one is not a greedy algorithm?
(A) Prim’s Algorithm
(B) Kruskal’s Algorithm
(C) Huffman Coding
(D) Bellman-Ford Algorithm

Answer: (D)

Explanation: Bellman-Ford is based on dynamic programming.

9. Which of the following is true about Dynamic Programming?
(A) Works only for problems with overlapping subproblems
(B) Requires sorting of input
(C) Used only for shortest path problems
(D) Uses divide-and-conquer

Answer: (A)

Explanation: Dynamic programming solves problems with optimal substructure and overlapping subproblems.

10. The best case time complexity for Quick Sort is:
(A) O(n²)
(B) O(n)
(C) O(n log n)
(D) O(log n)

Answer: (C)

Explanation: Best case occurs when the partition divides array evenly.

11. Which of the following algorithms always gives the optimal solution?
(A) Greedy
(B) Brute Force
(C) Divide and Conquer
(D) Dynamic Programming

Answer: (D)

Explanation: DP ensures optimal solution if problem satisfies optimal substructure.

12. What is the time complexity of traversing a graph with DFS?
(A) O(V²)
(B) O(V + E)
(C) O(V log V)
(D) O(E log V)

Answer: (B)

Explanation: DFS visits all vertices and edges once → O(V + E)

13. In which case will linear search be faster than binary search?
(A) Sorted arrays
(B) Unsorted arrays
(C) Linked lists
(D) Both B and C

Answer: (D)

Explanation: Binary search requires sorted data. Linear search works on both.

14. What is the worst-case time complexity of Quick Sort?
(A) O(n²)
(B) O(n log n)
(C) O(log n)
(D) O(n)

Answer: (A)

Explanation: Worst-case occurs when pivot divides array poorly.

15. In Prim’s algorithm, what is used to select the next edge?
(A) Stack
(B) Queue
(C) Priority Queue
(D) Hash Map

Answer: (C)

Explanation: Priority queue helps pick minimum weight edge efficiently.

16. What is the recurrence relation for Merge Sort?
(A) T(n) = T(n−1) + O(1)
(B) T(n) = 2T(n/2) + O(n)
(C) T(n) = T(n/2) + O(n)
(D) T(n) = T(n−1) + O(n)

Answer: (B)

Explanation: Merge Sort splits into two and merges → T(n) = 2T(n/2) + O(n)

17. What is the time complexity to insert an element into a hash table (average case)?
(A) O(1)
(B) O(log n)
(C) O(n)
(D) O(n log n)

Answer: (A)

Explanation: Hash tables offer average constant time for insert.

18. Which of the following is used to find Minimum Spanning Tree?
(A) Dijkstra’s
(B) Bellman-Ford
(C) Kruskal’s
(D) Floyd-Warshall

Answer: (C)

Explanation: Kruskal’s algorithm finds MST using greedy method.

19. (MSQ) Which algorithms are based on Divide-and-Conquer?
(A) Merge Sort
(B) Quick Sort
(C) Dijkstra’s Algorithm
(D) Binary Search

Answers: (A), (B), (D)

Explanation: Merge Sort, Quick Sort, and Binary Search divide the problem into subproblems.

20. (MSQ) Which of the following are true about Dijkstra’s algorithm?
(A) Works for graphs with negative weights
(B) Finds shortest path from a single source
(C) Can use a priority queue
(D) Gives correct results only for non-negative weights

Answers: (B), (C), (D)

Explanation: Dijkstra fails with negative weights. Works from a source using priority queue.

1. Which of the following is not accepted by a finite automaton?

  • (A) Set of all strings over {0,1} with an even number of 0s
  • (B) Set of strings of the form 0ⁿ1ⁿ
  • (C) Set of strings ending in 00
  • (D) Set of strings with no two consecutive 1s

Answer: (B)

Explanation: 0ⁿ1ⁿ is not regular; requires memory → needs a pushdown automaton.

2. Which among the following does a Pushdown Automaton (PDA) use for memory?

  • (A) Queue
  • (B) Stack
  • (C) Array
  • (D) Register

Answer: (B)

Explanation: PDA uses a stack to track context-free grammar productions.

3. Which language is not context-free?

  • (A) {aⁿbⁿ | n ≥ 0}
  • (B) {aⁿbⁿcⁿ | n ≥ 0}
  • (C) {w ∈ {a,b}* | w has equal number of a’s and b’s}
  • (D) {w ∈ {a,b}* | w is a palindrome}

Answer: (B)

Explanation: Language with equal number of a’s, b’s, and c’s (in order) is not context-free.

4. Which of the following is a correct statement?

  • (A) Every regular language is context-free
  • (B) Every context-free language is regular
  • (C) Every non-regular language is context-free
  • (D) All context-free languages are deterministic

Answer: (A)

Explanation: Regular ⊆ Context-free ⊆ Recursive.

5. What is the function of a transition in a Deterministic Finite Automaton (DFA)?

  • (A) Removes a symbol
  • (B) Adds a state
  • (C) Moves between states based on input
  • (D) Reads the stack

Answer: (C)

Explanation: DFA transitions from one state to another on an input symbol.

6. The pumping lemma is used to:

  • (A) Prove language is regular
  • (B) Minimize a DFA
  • (C) Show language is not regular
  • (D) Convert NFA to DFA

Answer: (C)

Explanation: Pumping Lemma is a contradiction tool to prove non-regularity.

7. A Turing Machine can be used to model:

  • (A) Finite automaton
  • (B) PDA
  • (C) Real computers
  • (D) Only regular languages

Answer: (C)

Explanation: Turing machines can simulate any real-world computation.

8. Which of the following languages is undecidable?

  • (A) Set of all regular languages
  • (B) Language accepted by PDA
  • (C) Halting problem
  • (D) Context-free language

Answer: (C)

Explanation: Halting problem is a classic undecidable problem.

9. In a DFA, what is the maximum number of transitions from a state over a single input symbol?

  • (A) 0
  • (B) 1
  • (C) 2
  • (D) Infinite

Answer: (B)

Explanation: DFA has exactly one transition per symbol from each state.

10. The language generated by the regular expression (a|b)*abb is:

  • (A) Strings ending with abb
  • (B) Strings containing abb
  • (C) Strings starting with abb
  • (D) Strings with only a’s and b’s

Answer: (A)

Explanation: The expression ensures string ends with abb.

11. What is the result of applying the Kleene star (*) on a language L?

  • (A) Infinite union of L
  • (B) Power set of L
  • (C) All strings formed by zero or more concatenations of L
  • (D) Reverse of L

Answer: (C)

Explanation: Kleene star → L* = ∪ Lⁿ for n = 0 to ∞

12. The minimum number of states in a DFA to recognize the language of strings over {0,1} divisible by 3 (in binary) is:

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

Answer: (C)

Explanation: Modulo 3 → DFA has 3 states (0,1,2 mod).

13. Which of the following automata models has infinite memory?

  • (A) DFA
  • (B) PDA
  • (C) NFA
  • (D) Turing Machine

Answer: (D)

Explanation: Turing machine uses an infinite tape as memory.

14. Which language class is closed under union, concatenation, and Kleene star?

  • (A) Regular languages
  • (B) Context-free languages
  • (C) Context-sensitive languages
  • (D) Recursive languages

Answer: (A)

Explanation: Regular languages are closed under all three operations.

15. Which machine is used to accept context-free languages?

  • (A) DFA
  • (B) NFA
  • (C) PDA
  • (D) Turing Machine

Answer: (C)

Explanation: PDA accepts context-free languages.

16. Which grammar is suitable for programming languages with nested structures?

  • (A) Regular Grammar
  • (B) Context-Free Grammar
  • (C) Unrestricted Grammar
  • (D) Linear Grammar

Answer: (B)

Explanation: CFGs support nesting via recursion.

17. The set of all recursively enumerable languages is:

  • (A) Decidable
  • (B) Recognizable
  • (C) Not recognizable
  • (D) Regular

Answer: (B)

Explanation: RE languages are recognizable but not always decidable.

18. Which of the following is not true for regular languages?

  • (A) They can be represented by DFAs
  • (B) They can be described using regular expressions
  • (C) They can be accepted by a PDA
  • (D) They are closed under intersection

Answer: (C)

Explanation: PDA is for CFGs; regular languages don’t need a PDA.

19. Which of the following are regular languages?

  • (A) Set of all strings over {a, b} with even number of a's
  • (B) {0ⁿ1ⁿ | n ≥ 0}
  • (C) Set of all strings that do not contain substring "11"
  • (D) {w | w is the reverse of itself}

Answers: (A), (C)

Explanation: (B) and (D) are not regular.

20. Turing Machines can:

  • (A) Simulate any algorithm
  • (B) Solve Halting Problem
  • (C) Accept regular languages
  • (D) Accept context-free languages

Answers: (A), (C), (D)

Explanation: TMs can simulate DFA and PDA, but Halting Problem is undecidable.

1. Which of the following is performed during lexical analysis?

  • (A) Syntax checking
  • (B) Token generation
  • (C) Semantic analysis
  • (D) Intermediate code generation

Answer: (B)

Explanation: Lexical analysis scans input and produces tokens.

2. Which data structure is used in recursive descent parsing?

  • (A) Stack
  • (B) Queue
  • (C) Recursion (Call stack)
  • (D) DFA

Answer: (C)

Explanation: Recursive descent uses the system call stack.

3. The output of syntax analysis is:

  • (A) Tokens
  • (B) Intermediate code
  • (C) Syntax tree or Parse tree
  • (D) Machine code

Answer: (C)

Explanation: Syntax analysis produces a parse tree based on grammar.

4. Which of the following is an example of intermediate representation?

  • (A) Assembly code
  • (B) Three-address code
  • (C) Machine code
  • (D) Bytecode

Answer: (B)

Explanation: TAC is used during intermediate code generation.

5. Which phase assigns memory to variables?

  • (A) Lexical analysis
  • (B) Syntax analysis
  • (C) Intermediate code generation
  • (D) Runtime environment

Answer: (D)

Explanation: Runtime environment handles memory layout and management.

6. Which of the following parsing techniques is top-down?

  • (A) LR(1)
  • (B) LALR
  • (C) LL(1)
  • (D) SLR

Answer: (C)

Explanation: LL(1) is a top-down parsing method.

7. In a typical compiler, which phase comes after syntax analysis?

  • (A) Code optimization
  • (B) Lexical analysis
  • (C) Semantic analysis
  • (D) Parsing

Answer: (C)

Explanation: Semantic analysis checks for meaning after syntactic structure.

8. Which of the following statements is true for peephole optimization?

  • (A) Works on high-level code
  • (B) Works on source code
  • (C) Works on a small set of instructions
  • (D) Is a type of data flow analysis

Answer: (C)

Explanation: Peephole optimization works on a small window of instructions.

9. What does the common subexpression elimination (CSE) do?

  • (A) Removes all variables
  • (B) Replaces duplicate expressions with temporary variables
  • (C) Reduces memory
  • (D) Adds redundant expressions

Answer: (B)

Explanation: CSE avoids recomputing the same expression multiple times.

10. Which of the following analyses is used to detect dead code?

  • (A) Constant folding
  • (B) Liveness analysis
  • (C) Common subexpression
  • (D) Code motion

Answer: (B)

Explanation: Liveness analysis finds variables whose values are never used.

11. Which of these is not a component of a grammar?

  • (A) Terminals
  • (B) Non-terminals
  • (C) Semantic actions
  • (D) Start symbol

Answer: (C)

Explanation: Semantic actions are used during translation, not grammar.

12. Syntax-directed translation applies semantic rules to:

  • (A) Grammar terminals
  • (B) Parse tree nodes
  • (C) Tokens
  • (D) Assembly code

Answer: (B)

Explanation: Semantic rules are applied on parse tree nodes.

13. Which of the following optimizations require control flow graphs?

  • (A) Constant propagation
  • (B) Loop unrolling
  • (C) Dead code elimination
  • (D) All of the above

Answer: (D)

Explanation: All these require understanding control flow structure.

14. Which code is the closest to machine code?

  • (A) Intermediate code
  • (B) Source code
  • (C) Target code
  • (D) Abstract syntax tree

Answer: (C)

Explanation: Target code is machine-dependent output.

15. Which optimization can reduce loop overhead?

  • (A) Strength reduction
  • (B) Loop unrolling
  • (C) Code hoisting
  • (D) Constant folding

Answer: (B)

Explanation: Loop unrolling reduces the number of iterations and overhead.

16. What is constant propagation?

  • (A) Replacing variables with constants where known
  • (B) Replacing constants with variables
  • (C) Removing constant declarations
  • (D) Folding constant operations

Answer: (A)

Explanation: It replaces variables with constant values during optimization.

17. Which of the following is not a type of intermediate code?

  • (A) Postfix notation
  • (B) Three-address code
  • (C) Syntax tree
  • (D) Assembly language

Answer: (D)

Explanation: Assembly is low-level, not an intermediate representation.

18. Which phase handles register allocation?

  • (A) Lexical analysis
  • (B) Code generation
  • (C) Code optimization
  • (D) Semantic analysis

Answer: (B)

Explanation: Register allocation is part of code generation.

19. Which of the following are examples of data flow analyses? (MSQ)

  • (A) Constant propagation
  • (B) Common subexpression elimination
  • (C) Peephole optimization
  • (D) Liveness analysis

Answers: (A), (B), (D)

Explanation: These require flow of data across basic blocks.

20. Syntax-directed definitions can be used to: (MSQ)

  • (A) Build parse trees
  • (B) Perform type checking
  • (C) Generate intermediate code
  • (D) Detect lexical errors

Answers: (A), (B), (C)

Explanation: SDDs enable parse tree decoration and code generation, not lexical error detection.

TYPE : MCQ Theoretical

1. Which of the following is used by a process to request a service from the operating system?

  • (A) Interrupt
  • (B) System call
  • (C) Signal
  • (D) Procedure call

Answer: (B)

Explanation: System calls provide an interface between a running program and the OS.

2. Which of the following is not a valid state of a process?

  • (A) Ready
  • (B) Running
  • (C) Waiting
  • (D) Suspended IO

Answer: (D)

Explanation: Typical process states are new, ready, running, waiting, terminated.

3. Which of the following system calls creates a new process?

  • (A) exec()
  • (B) fork()
  • (C) kill()
  • (D) exit()

Answer: (B)

Explanation: fork() is used to create a new process.

4. The critical section problem arises in a system with:

  • (A) One process
  • (B) Multiple threads accessing shared resources
  • (C) No shared memory
  • (D) No kernel

Answer: (B)

Explanation: Critical section problems arise due to concurrent access to shared data.

5. A binary semaphore can have:

  • (A) Only 0 and 1 values
  • (B) Only positive integers
  • (C) Only even values
  • (D) Negative and positive integers

Answer: (A)

Explanation: Binary semaphores are used for mutual exclusion.

6. Which condition is necessary for deadlock to occur?

  • (A) Preemption
  • (B) Circular wait
  • (C) No mutual exclusion
  • (D) All processes must terminate

Answer: (B)

Explanation: Circular wait is one of the Coffman’s four necessary conditions for deadlock.

7. In Round Robin scheduling, the performance depends significantly on:

  • (A) Number of processes
  • (B) Size of the ready queue
  • (C) Quantum time
  • (D) Priority levels

Answer: (C)

Explanation: The time quantum directly affects turnaround time and context switching overhead.

8. Which CPU scheduling algorithm may lead to starvation?

  • (A) First-Come-First-Serve (FCFS)
  • (B) Shortest Job First (SJF)
  • (C) Round Robin
  • (D) Multilevel Queue

Answer: (B)

Explanation: SJF may indefinitely postpone long jobs if short jobs keep arriving.

9. Which of the following page replacement algorithms may suffer from Belady’s Anomaly?

  • (A) LRU
  • (B) FIFO
  • (C) Optimal
  • (D) LFU

Answer: (B)

Explanation: FIFO can show increased page faults with more frames (Belady's Anomaly).

10. Which data structure is used in virtual memory for page table mapping?

  • (A) Stack
  • (B) Queue
  • (C) Hash table
  • (D) Array

Answer: (D)

Explanation: Page tables are generally implemented using arrays for fast indexing.

11. In which memory allocation technique may external fragmentation occur?

  • (A) Paging
  • (B) Segmentation
  • (C) Contiguous memory allocation
  • (D) Virtual memory

Answer: (C)

Explanation: Contiguous memory allocation may leave unused holes in memory.

12. What is the main advantage of demand paging?

  • (A) Reduces internal fragmentation
  • (B) Reduces external fragmentation
  • (C) Reduces memory usage
  • (D) Increases context switching

Answer: (C)

Explanation: Demand paging loads pages only when needed, reducing memory usage.

13. Which file allocation method allows direct access?

  • (A) Sequential
  • (B) Linked
  • (C) Contiguous
  • (D) Indexed

Answer: (D)

Explanation: Indexed allocation stores all block addresses in an index block, enabling direct access.

14. The working set model is used for:

  • (A) CPU scheduling
  • (B) Deadlock avoidance
  • (C) Page replacement
  • (D) File indexing

Answer: (C)

Explanation: The working set model determines the pages needed by a process to avoid thrashing.

15. Which of the following statements is true about threads?

  • (A) Threads have separate memory space
  • (B) Threads are heavyweight
  • (C) Threads share code and data segments
  • (D) Threads run on different OS

Answer: (C)

Explanation: Threads of a process share code, data, and open files.

16. Which of the following algorithms is not used for I/O scheduling?

  • (A) SSTF
  • (B) SCAN
  • (C) LOOK
  • (D) LRU

Answer: (D)

Explanation: LRU is used for page replacement, not disk I/O.

17. The banker's algorithm is used for:

  • (A) Memory allocation
  • (B) CPU scheduling
  • (C) Deadlock avoidance
  • (D) File system recovery

Answer: (C)

Explanation: Banker's algorithm ensures a system will not enter an unsafe state.

18. Which of these is a non-preemptive scheduling algorithm?

  • (A) FCFS
  • (B) Round Robin
  • (C) Priority Scheduling
  • (D) Multilevel Queue

Answer: (A)

Explanation: FCFS is strictly non-preemptive.

19. Which of the following can lead to deadlock? (MSQ)

  • (A) Mutual exclusion
  • (B) Circular wait
  • (C) Preemption
  • (D) Hold and wait

Answers: (A), (B), (D)

Explanation: Deadlock requires all of these except preemption.

20. Which of the following are types of inter-process communication (IPC)? (MSQ)

  • (A) Shared memory
  • (B) Message passing
  • (C) Semaphores
  • (D) File systems

Answers: (A), (B), (C)

Explanation: File systems are not directly used for IPC, but shared memory, message passing, and semaphores are.

TYPE : MCQ Theoretical

1. In an ER diagram, a weak entity is one that:

  • (A) Has its own primary key
  • (B) Does not have any attributes
  • (C) Cannot be uniquely identified by its own attributes alone
  • (D) Is independent of other entities

Answer: (C)

Explanation: Weak entities require a foreign key and a partial key to be uniquely identified.

2. Which of the following is not a basic operation of relational algebra?

  • (A) Selection
  • (B) Projection
  • (C) Intersection
  • (D) Nesting

Answer: (D)

Explanation: Nesting is not a basic operation in relational algebra.

3. The primary key of a relation:

  • (A) Must be NULL
  • (B) Must be unique
  • (C) Can be duplicated
  • (D) Can be NULL

Answer: (B)

Explanation: A primary key must have unique, non-NULL values.

4. Which normal form removes partial dependency?

  • (A) 1NF
  • (B) 2NF
  • (C) 3NF
  • (D) BCNF

Answer: (B)

Explanation: 2NF eliminates partial dependency (dependency on part of a composite key).

5. The JOIN operation in relational algebra is a combination of:

  • (A) Selection and projection
  • (B) Cartesian product and selection
  • (C) Union and projection
  • (D) Cartesian product and union

Answer: (B)

Explanation: JOIN is implemented by taking Cartesian product followed by selection.

6. Which of the following indexing structures allows for range queries efficiently?

  • (A) Hash index
  • (B) B-tree
  • (C) Heap
  • (D) Binary search tree

Answer: (B)

Explanation: B-trees and B+ trees support range-based queries efficiently.

7. Which SQL command is used to remove a table?

  • (A) REMOVE
  • (B) DROP
  • (C) DELETE
  • (D) ERASE

Answer: (B)

Explanation: DROP TABLE permanently deletes a table and its structure.

8. Which operation is non-lossy?

  • (A) Natural join
  • (B) Left outer join
  • (C) Right outer join
  • (D) Cartesian product

Answer: (A)

Explanation: Natural joins ensure a non-lossy decomposition when proper conditions are met.

9. A foreign key:

  • (A) Must reference a primary key in another table
  • (B) Must be unique
  • (C) Cannot be NULL
  • (D) Cannot be used in JOIN operations

Answer: (A)

Explanation: A foreign key references the primary key of another relation.

10. Which of the following schedules is conflict-serializable?

  • (A) One that can be transformed into a serial schedule by swapping non-conflicting operations
  • (B) One where each transaction executes atomically
  • (C) One that follows 2PL protocol
  • (D) One with no concurrency

Answer: (A)

Explanation: Conflict-serializable schedules are those equivalent to some serial schedule.

11. What is the main advantage of B+ trees over B-trees?

  • (A) Faster updates
  • (B) Better memory management
  • (C) Faster access to data at leaf level
  • (D) Less height

Answer: (C)

Explanation: B+ trees store data only at leaf level, making range queries more efficient.

12. Which of the following is not a relational integrity constraint?

  • (A) Entity integrity
  • (B) Referential integrity
  • (C) Domain integrity
  • (D) Normal form

Answer: (D)

Explanation: Normal forms are not constraints; they are design principles.

13. A relation is in BCNF if:

  • (A) It is in 2NF and every determinant is a candidate key
  • (B) It is in 1NF and all attributes are atomic
  • (C) It is in 3NF and no transitive dependency exists
  • (D) It has no repeating groups

Answer: (A)

Explanation: BCNF requires every functional dependency’s LHS to be a candidate key.

14. Which SQL keyword is used to remove duplicate records?

  • (A) UNIQUE
  • (B) DISTINCT
  • (C) DIFFERENT
  • (D) CLEAN

Answer: (B)

Explanation: SELECT DISTINCT is used to eliminate duplicate rows.

15. In 2-phase locking (2PL), which phase ensures no new locks are acquired?

  • (A) Growing phase
  • (B) Shrinking phase
  • (C) Wait-die phase
  • (D) Deadlock detection phase

Answer: (B)

Explanation: In the shrinking phase, no new locks are allowed; only releases happen.

16. What is the purpose of serializability in transactions?

  • (A) Deadlock prevention
  • (B) Security
  • (C) Consistency
  • (D) Fast performance

Answer: (C)

Explanation: Serializability ensures consistency equivalent to serial execution.

17. Which of the following file organizations is best for equality search?

  • (A) Sorted file
  • (B) Hashed file
  • (C) Heap file
  • (D) Indexed file

Answer: (B)

Explanation: Hashed files are efficient for equality-based lookups.

18. The purpose of the undo log is to:

  • (A) Rollback changes during failure
  • (B) Redo transactions
  • (C) Record committed data
  • (D) Track successful queries

Answer: (A)

Explanation: Undo logs are used to revert changes of uncommitted transactions.

19. Which of the following can cause anomaly in relational database design?

  • (A) Redundancy
  • (B) Partial dependency
  • (C) Transitive dependency
  • (D) Functional dependency

Answers: (A), (B), (C)

Explanation: Redundancy, partial and transitive dependencies lead to update, insert, delete anomalies.

20. Which of the following are ACID properties in transactions?

  • (A) Atomicity
  • (B) Consistency
  • (C) Isolation
  • (D) Durability

Answers: (A), (B), (C), (D)

Explanation: These are the four essential properties of transactions in database systems.

TYPE : MCQ

1. Which layer of the OSI model is responsible for end-to-end delivery of messages?

  • (A) Data Link
  • (B) Network
  • (C) Transport
  • (D) Session

Answer: (C)

Explanation: Transport layer handles end-to-end communication, including reliability and flow control.

2. Which switching method requires the entire message to be received before forwarding?

  • (A) Circuit switching
  • (B) Packet switching
  • (C) Message switching
  • (D) Virtual circuit switching

Answer: (C)

Explanation: Message switching stores the entire message before forwarding, causing delay.

3. Which protocol is used to resolve an IP address to a MAC address?

  • (A) DHCP
  • (B) ICMP
  • (C) ARP
  • (D) NAT

Answer: (C)

Explanation: ARP (Address Resolution Protocol) maps IP addresses to MAC addresses.

4. The function of DHCP is to:

  • (A) Resolve domain names
  • (B) Provide MAC addresses
  • (C) Allocate IP addresses dynamically
  • (D) Transfer files

Answer: (C)

Explanation: DHCP (Dynamic Host Configuration Protocol) assigns IPs dynamically to devices.

5. In the data link layer, framing is used to:

  • (A) Transmit data
  • (B) Detect collisions
  • (C) Identify message boundaries
  • (D) Perform error correction

Answer: (C)

Explanation: Framing helps in identifying start and end of frames in a data stream.

6. In distance vector routing, routers share:

  • (A) Complete topology
  • (B) Only updates
  • (C) Their own routing tables
  • (D) Metrics to neighbors only

Answer: (C)

Explanation: Distance vector routing uses periodic sharing of routing tables with neighbors.

7. CIDR notation /24 implies how many IP addresses?

  • (A) 64
  • (B) 128
  • (C) 256
  • (D) 512

Answer: (C)

Explanation: /24 implies 32 - 24 = 8 bits for host = 2⁸ = 256 IP addresses.

8. Which error detection technique uses a generator polynomial?

  • (A) Parity bit
  • (B) Checksum
  • (C) CRC
  • (D) Hamming code

Answer: (C)

Explanation: Cyclic Redundancy Check (CRC) uses polynomials for error detection.

9. UDP is:

  • (A) Reliable and connection-oriented
  • (B) Unreliable and connectionless
  • (C) Reliable and connectionless
  • (D) Unreliable and connection-oriented

Answer: (B)

Explanation: UDP is a connectionless protocol and does not guarantee delivery.

10. TCP ensures congestion control using:

  • (A) Sliding window
  • (B) Exponential back-off
  • (C) Go-back-N
  • (D) Slow start and congestion avoidance

Answer: (D)

Explanation: TCP uses slow start, congestion avoidance, fast retransmit, and fast recovery.

11. Ethernet uses which medium access control method?

  • (A) CSMA/CD
  • (B) Token passing
  • (C) FDMA
  • (D) TDMA

Answer: (A)

Explanation: Ethernet uses CSMA/CD for collision detection in a shared medium.

12. What is fragmentation in IP?

  • (A) Packet duplication
  • (B) Dividing a large packet into smaller pieces
  • (C) Compressing data
  • (D) Encapsulation

Answer: (B)

Explanation: Fragmentation is done when packet size exceeds MTU.

13. ICMP is used for:

  • (A) Secure communication
  • (B) Routing updates
  • (C) Sending error/control messages
  • (D) IP address assignment

Answer: (C)

Explanation: ICMP sends error messages like "destination unreachable", "time exceeded", etc.

14. What protocol is used for email transfer between mail servers?

  • (A) SMTP
  • (B) IMAP
  • (C) POP
  • (D) FTP

Answer: (A)

Explanation: SMTP is used to transfer emails between servers.

15. Which routing algorithm uses a complete network topology?

  • (A) Distance vector
  • (B) Bellman-Ford
  • (C) Flooding
  • (D) Link state

Answer: (D)

Explanation: Link state routing algorithms maintain complete topology info.

16. NAT is used to:

  • (A) Assign MAC addresses
  • (B) Translate private IPs to public IPs
  • (C) Route packets across ISPs
  • (D) Encrypt data

Answer: (B)

Explanation: NAT maps private IP addresses to public IP addresses.

17. A socket consists of:

  • (A) IP address + MAC
  • (B) IP address + Port
  • (C) MAC address + Port
  • (D) IP + TTL

Answer: (B)

Explanation: Socket = IP address + Port number (to identify process-to-process communication).

18. Which protocol is used to retrieve domain names?

  • (A) FTP
  • (B) SMTP
  • (C) DNS
  • (D) HTTP

Answer: (C)

Explanation: DNS (Domain Name System) maps domain names to IP addresses.

19. Which of the following are Transport Layer responsibilities?

  • (A) Flow control
  • (B) Routing
  • (C) Congestion control
  • (D) End-to-end delivery

Answers: (A), (C), (D)

Explanation: Transport layer handles end-to-end delivery, flow control, congestion control (not routing).

20. In TCP, which mechanisms are used for congestion control?

  • (A) Slow start
  • (B) Fast retransmit
  • (C) Window scaling
  • (D) All of the above

Answer: (D)

Explanation: TCP uses slow start, fast retransmit, and window scaling to control congestion.


Why EII’s Resources Are Essential

Get Started with Dedicated Practice: Log in to your student account at https://engineersinstitute.com to download the weekly Mock Test and Practice Sets. Practice diligently, as each test includes Detailed Solutions and Analysis Reports with shortcuts, tips, and tricks to master complex topics efficiently.

Historical Question Alignment EII’s resources have consistently reflected GATE exam trends. Here are key topics where questions matched recent years:

Tips to Practice Question Papers Effectively

  1. Simulate Exam Conditions: Time yourself (1.5–2 minutes per question) to build speed.
  2. Target Weak Areas: Use practice sets to focus on challenging topics.
  3. Weekly Revision: Revisit solved papers to reinforce concepts.
  4. Learn from Errors: Analyze mistakes using detailed solutions to improve accuracy.

Benefits of Scheduled Mock Practices

Have doubts or technical issues? Contact us at 9990357855 via WhatsApp for instant support!