The GATE 2025 CSE 2 Question Paper PDF is available as the exam is over. IIT Roorkee is conducting the GATE 2025 Computer Science & Information Technology exam on February 1st in Shift 2 took place from 2:30 PM to 5:30 PM. As per the exam pattern, students are expected to answer 65 questions in the GATE 2025 CSE Question Paper carrying a total weightage of 100 marks. 10 questions are from the General Aptitude section and 55 questions are from Engineering Mathematics and Core Discipline.

The difficulty level of GATE 2025 CSE Slot 2 was moderate to tough.

GATE 2025 CSE Slot 2 Question Paper with Solutions PDF

GATE 2025 CSE Slot 2 Question Paper with Answer Key download iconDownload Check Solutions

Question 1:

Given N distinct elements in an array, determine the number of comparisons required to find the element which is not the largest:

  • (A) \( 2N - 1 \)
  • (B) \( N - 1 \)
  • (C) 0
  • (D) \( 1 \)
Correct Answer: (D) 1
View Solution

Question 2:

Consider the following code:

    main() {
      int x = 126, y = 105;
      { 
        if (x > y) 
          x = x - y;
        else 
          y = y - x;
      }
      while (x != y) 
        printf("%d", x);
    }
      
What is the output?

  • (A) 21
  • (B) 105
  • (C) 126
  • (D) 0
Correct Answer: (A) 21
View Solution

Question 3:

In a binary search tree with the following elements: \( 10, -4, 15, 13, 20, 5, 16, 19 \), the number of edges from node 19 to the root is?

  • (A) 3
  • (B) 4
  • (C) 2
  • (D) 5
Correct Answer: (B) 4
View Solution

Question 4:

Consider the following code:

    int a;
    int arr[] = {30, 50, 10};
    int *ptr = &arr[10] + 1;
    a = *ptr;
    (*ptr)++;
    ptr = ptr + 1;
    printf("%d", a + arr[1] + *ptr);
      
What is the output?

  • (A) 100
  • (B) 110
  • (C) 111
  • (D) 120
Correct Answer: (C) 111
View Solution

Question 5:

Consider the following hierarchical cache system with the following access times:

Cache Levels and Access Times
Cache Level Hit Rate Access Time
L1 90% 1 ns
L2 80% 10 ns
L3 100% 100 ns
Find \( T_{avg} \) for hierarchical or simultaneous access.

  • (A) \( 3.7 \, \text{ns} \)
  • (B) \( 4 \, \text{ns} \)
  • (C) \( 5 \, \text{ns} \)
  • (D) \( 6 \, \text{ns} \)
Correct Answer: (B) \( 4 \, \text{ns} \)
View Solution

Question 6:

Consider a binary tree in which every node has either 0 or 2 children. Let \( N > 0 \) be the number of nodes in the tree. The number of nodes that have exactly 2 children is:

  • (A) \( \frac{N+1}{2} \)
  • (B) \( \frac{N-2}{2} \)
  • (C) \( \frac{N}{2} \)
  • (D) \( \frac{N-1}{2} \)
Correct Answer: (D) \( \frac{N-1}{2} \)
View Solution

Question 7:

Given the sequence: \( 5, 6, 15, \_, 89, 170, 291 \), find the missing number.

  • (A) 30
  • (B) 35
  • (C) 40
  • (D) 45
Correct Answer: (C) 40
View Solution

Question 8:

Bird: Nest :: Bee: ____?

  • (A) Hive
  • (B) Colony
  • (C) Den
  • (D) Burrow
Correct Answer: (A) Hive
View Solution

Question 9:

Given a pipeline with 5 stages, the delay for each stage is as follows:

Stage and Delay Time
Stage Delay (ns)
1 250
2 150
3 100
4 200
5 50
The buffer delay is 10 ns. Find the time for \( n = 1000 \) instructions.

  • (A) 261.040 microseconds
  • (B) 200.050 microseconds
  • (C) 150.030 microseconds
  • (D) 100.020 microseconds
Correct Answer: (A) 261.040 microseconds
View Solution

Question 10:

Given the following cache parameters:

Memory Structure
Tag 4 bits
Index 12 bits
Block Size 1 byte
Find the size of the main memory and the size of the cache memory.

  • (A) 64 KB, 4 KB
  • (B) 128 KB, 8 KB
  • (C) 256 KB, 16 KB
  • (D) 512 KB, 32 KB
Correct Answer: (A) 64 KB, 4 KB
View Solution

Question 11:

Consider the following process information for Shortest Remaining Time First (SRTF) scheduling:

Process Arrival and Burst Time
Process Arrival Time (AT) Burst Time (BT)
P1 0 10
P2 1 13
P3 2 6
P4 8 9
Find the turnaround time for each process.

  • (A) 19
  • (B) 20
  • (C) 18
  • (D) 15
Correct Answer: (A) 19
View Solution

Question 12:

Consider the following C code:

        int main() {
          sum = 0;
          for (n = 1; n < 3; n++) {
            n++;
            sum += g(f(n));
          }
          printf("%d", sum);
        }
        
        int g(n) {
          return 10 + n;
        }
        
        int f(n) {
          return g(2 * n);
        }
          
What is the output?

  • (A) 40
  • (B) 46
  • (C) 50
  • (D) 30
Correct Answer: (B) 46
View Solution

Question 13:

What is included in the Instruction Set Architecture (ISA)?

  • (A) Number of Registers
  • (B) Clock Cycle Time or Frequency of CPU
  • (C) Number of Cache Levels
  • (D) Cache Size
Correct Answer: (A) Number of Registers, (B) Clock Cycle Time or Frequency of CPU
View Solution

Question 14:

In an IPv4 packet, if \( X \) is written in the protocol field, which of the following is not a valid protocol \( X \)?

  • (A) IGMP
  • (B) ICMP
  • (C) RIP
  • (D) OSPF
Correct Answer: (C) RIP
View Solution

Question 15:

Given the matrix \( A = \begin{bmatrix} 1 & 2
2 & -1 \end{bmatrix} \), find \( A^8 \).

  • (A) \( 625I \)
  • (B) \( 625A \)
  • (C) \( I \)
  • (D) \( 25I \)
Correct Answer: (A) \( 625I \)
View Solution

Question 16:

Let \( L \), \( M \), and \( N \) be non-singular matrices of size \( 3 \times 3 \), such that \( L^2 = L^{-1} \), \( M = L^8 \), and \( N = L^2 \). Find \( |M - N| \).

  • (A) 0
  • (B) 1
  • (C) 2
  • (D) 3
Correct Answer: (A) 0
View Solution

Question 17:

Given that the integral \( I = \int_{x}^{i} \log t \, dt = \frac{1}{4} \), find the value of \( x \).

  • (A) \( \sqrt{e} \)
  • (B) \( e \)
  • (C) \( 1 \)
  • (D) \( 2 \)
Correct Answer: (A) \( \sqrt{e} \)
View Solution

Question 18:

Given the following information:
\[ \text{Logical address space} = 2^{32},
\quad \text{Page size} = 2084 \, \text{bytes},
\quad \text{PTE size} = 8 \, \text{bytes},
\quad \text{2-level paging system}. \]
Calculate the number of bits required to search in the outer level page table.

  • (A) \( 2^8 \)
  • (B) \( 2^9 \)
  • (C) \( 2^{10} \)
  • (D) \( 2^7 \)
Correct Answer: (B) \( 2^9 \)
View Solution

Question 19:

Given an array \( A[n] \) such that: \[ A[0] \to A[i] \text{ is in non-decreasing order}, \quad A[i+1] \to A[n] \text{ is in non-increasing order}. \] Find the time complexity to find \( A[i] \).

  • (A) \( O(N) \)
  • (B) \( O(\log_2 N) \)
  • (C) \( O(\log n \times \log n) \)
  • (D) \( O(1) \)
Correct Answer: (C) \( O(\log n \times \log n) \)
View Solution

Question 20:

In the case of a 4-bit ripple counter, if the time period of the waveform at the last flip-flop is 64 microseconds, what is the input frequency?

  • (A) 250 KHz
  • (B) 125 KHz
  • (C) 500 KHz
  • (D) 2 KHz
Correct Answer: (A) 250 KHz
View Solution

GATE 2025 CSE Slot 2 Question Paper

GATE 2025 CSE Slot 2 Question Paper with Solutions