
The GATE 2025 CSE Slot 1 on 1st Feb, 2025 from 9:30 to 12:30 PM has ended. IIT Roorkee conducted GATE 2025 CSE Slot 1. The exam is reported to be Moderate to Tough. There were 65 questions out of which 50-55 were doable. The general Aptitude section was easy, while it was difficult to manage all the questions in time.
Candidates had to answer 65 questions in 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.
You can download the memory based question paper with answer key here:
Let \( A \) be a \( 3 \times 3 \) matrix defined as: \[ A = \begin{bmatrix} 1 & 1 & 1
1 & 1 & 1
1 & 1 & -1 \end{bmatrix} \] Find the eigenvalues of \( A^{13} \).
Step 1: Finding Eigenvalues of Matrix \( A \)
- We first find the eigenvalues of matrix \( A \). To do this, we solve the characteristic equation: \[ \det(A - \lambda I) = 0 \] \[ A - \lambda I = \begin{bmatrix} 1-\lambda & 1 & 1
1 & 1-\lambda & 1
1 & 1 & -1-\lambda \end{bmatrix} \] - The determinant of the above matrix is calculated, and we solve for \( \lambda \). The eigenvalues of \( A \) are \( \lambda_1 = 3, \lambda_2 = -1, \lambda_3 = -1 \).
Step 2: Finding Eigenvalues of \( A^{13} \)
- If \( \lambda \) is an eigenvalue of matrix \( A \), then \( \lambda^{13} \) will be the corresponding eigenvalue of matrix \( A^{13} \). - Therefore, the eigenvalues of \( A^{13} \) are: \[ \lambda_1^{13} = 3^{13}, \quad \lambda_2^{13} = (-1)^{13} = -1, \quad \lambda_3^{13} = (-1)^{13} = -1 \]
Step 3: Conclusion
- The eigenvalues of \( A^{13} \) are \( 3^{13}, -1, -1 \).
Quick Tip: \textbf{Eigenvalues of Matrix Powers:} The eigenvalues of \( A^n \) are the eigenvalues of \( A \) raised to the power \( n \).
Match the following layers with their corresponding functionalities: Networking Layer Transport Layer Data Link Layer Options for matching: Host-to-host communication Data packet transfer Error detection and correction
Step 1: Understanding the layers and their function- Networking Layer (Layer 3): This layer is responsible for data packet transfer across different networks, typically by routing the packets between source and destination.
- Transport Layer (Layer 4): It provides host-to-host communication by managing end-to-end connections, flow control, and error recovery.
- Data Link Layer (Layer 2): This layer ensures that data is properly formatted and transmitted over a physical link. It handles error detection and correction to ensure reliable communication between devices on the same network.
Step 2: Explanation of the matches Networking Layer: It is responsible for the routing and forwarding of data packets between devices, making "Data packet transfer" the correct match. Transport Layer: It ensures the reliable communication between two hosts by managing error recovery, flow control, and segmenting the data into smaller packets, which is why "Host-to-host communication" is the correct function. Data Link Layer: This layer detects and corrects errors that may occur at the physical layer, making "Error detection and correction" the most appropriate function.
Quick Tip: OSI Model Layers: Layer 2 (Data Link Layer) deals with the physical link. Layer 3 (Networking Layer) is concerned with routing data packets across networks. Layer 4 (Transport Layer) focuses on communication between hosts.
What is the output of the following C code?
void foo(int *p, int x)
{ *p = x;
void main()
{ int *z; int a = 20, b = 25;
z = &a;
foo(z, b);
printf("%d", a);
Step 1: Understanding the Code - In the `main` function, two integer variables \(a\) and \(b\) are initialized with values 20 and 25, respectively. - A pointer variable \(z\) is declared, and \(z\) is assigned the address of \(a\) using the statement \(z = \&a\).
Step 2: Understanding the Function Call `foo(z, b)` - The `foo` function takes two arguments: a pointer to an integer (`p`) and an integer (`x`). - Inside the `foo` function, the statement `*p = x;` modifies the value stored at the memory address pointed to by \(p\). In this case, \(p = z\), which points to \(a\), and \(x = b = 25\). - Therefore, the value of \(a\) is updated to 25, as \( *z = 25 \).
Step 3: Conclusion - After the call to `foo`, the value of \(a\) becomes 25. - The `printf` function then prints the value of \(a\), which is 25. Final Output: \[ \text{The output of the program is } 25. \]
Quick Tip: In C, when a pointer is passed to a function, any changes made to the value pointed by the pointer will affect the original variable in the calling function.
Find the signed binary expansion of the number -6.
Step 1: Understanding Signed Binary Representation - In signed binary representation, numbers are represented in two's complement form. To find the signed binary expansion of a number, we need to follow a few steps. - The two's complement representation uses the most significant bit (MSB) to represent the sign of the number, where `0` represents a positive number and `1` represents a negative number.
Step 2: Find Binary Expansion for 6 - First, we find the binary representation of the positive number 6 in standard binary format. - 6 in binary is \( 0110_2 \) for a 4-bit binary.
Step 3: Apply Two's Complement to Get -6 - To get the two's complement representation for -6, we follow these steps: 1. First, write the binary representation of +6: \( 0110_2 \). 2. Invert all the bits: \( 1001_2 \). 3. Add 1 to the result: \( 1001_2 + 1 = 1010_2 \). - So, the 2's complement representation of -6 for 4-bit binary is \( 1010_2 \). Step 4: Extending to 5 Bits for Signed Expansion - For the signed expansion in 5 bits, we need to add an additional bit to the left of the representation. The extra bit is 1 to maintain the negative sign. - Thus, the 5-bit signed binary representation of -6 is \( 11010_2 \).
Final Answer: \[ \text{The signed binary expansion of -6 in 5-bit representation is } 11010_2. \] Quick Tip: To convert a negative number into its signed binary representation using two's complement: Write the binary of the positive number. Invert the bits and add 1.
Which of the following is the greatest? \[ 0.\overline{6}, \quad 0.666, \quad \frac{5}{6}, \quad \frac{2}{3} \]
Step 1: Convert the decimals to fractions - The repeating decimal \( 0.\overline{6} \) (i.e., \(0.6666\ldots\)) is equivalent to \( \frac{2}{3} \). - The decimal \( 0.666 \) is a terminating decimal that equals \( \frac{2}{3} \). - The fraction \( \frac{5}{6} \) is already in its simplest form. - The fraction \( \frac{2}{3} \) is also in its simplest form.
Step 2: Comparison - \( 0.\overline{6} = \frac{2}{3} \), which is less than \( 0.666 \), since \( 0.666 \) is slightly greater than \( \frac{2}{3} \) in the decimal representation. - \( 0.666 \) is actually the greatest value among all the options, as \( 0.666 \) represents a decimal value that is slightly greater than the repeating decimal and is closer to \( \frac{5}{6} \).
Step 3: Conclusion - Therefore, \( 0.666 \) is the greatest of the four choices. Final Answer: \[ \boxed{0.666} \] Quick Tip: To compare repeating and terminating decimals, convert them to fractions and compare their values.
Given the following information: The logical address (L.A.) is 32 bits. The physical address (P.A.) is 20 bits. The page size (P.S.) is 2048 bytes (2 KB). What is the maximum number of entries in the page table? 1. \( 2^{10} \) 2. \( 2^{12} \) 3. \( 2^{20} \) 4. \( 2^{22} \)
Step 1: Understanding the Address Breakdown - The logical address space (L.A.) is 32 bits. This means the total number of bytes that can be addressed is \( 2^{32} \) bytes. - The physical address space (P.A.) is 20 bits. This means the total number of bytes that can be addressed in physical memory is \( 2^{20} \) bytes.
Step 2: Page Size Calculation - The page size is 2048 bytes, or \( 2^{11} \) bytes.
Step 3: Number of Pages in the Logical Address Space - The number of pages in the logical address space is: \[ \frac{2^{32}}{2^{11}} = 2^{21} \]
Step 4: Number of Frames in the Physical Address Space - The number of frames in the physical address space is: \[ \frac{2^{20}}{2^{11}} = 2^{9} \]
Step 5: Number of Entries in the Page Table - The number of entries in the page table is the number of pages in the logical address space, which is \( 2^{21} \). Thus, the maximum number of entries in the page table is \( 2^{21} \). Final Answer: \[ \boxed{2^{21}} \] Quick Tip: To calculate the number of entries in a page table, divide the total logical address space by the page size to get the number of pages. The number of entries is equal to the number of pages.
The TCP connection establishment process involves a 3-way handshake. Which of the following steps correctly represents the 3-way handshake?
Step 1: Understanding the 3-Way Handshake The 3-way handshake is used to establish a TCP connection between a client and a server. The steps are as follows:
- Step 1: SYN (Synchronize)
The client sends a SYN (synchronize) packet to the server to begin the connection. This packet contains the initial sequence number.
- Step 2: SYN-ACK (Synchronize-Acknowledgment)
The server responds with a SYN-ACK packet. This packet acknowledges the SYN request from the client and sends back its own SYN to the client.
- Step 3: ACK (Acknowledgment)
The client sends an ACK (acknowledgment) packet back to the server, confirming that the connection has been established.
Step 2: Conclusion Thus, the correct order of the 3-way handshake is \(\text{SYN} \rightarrow \text{SYN-ACK} \rightarrow \text{ACK}\).
Final Answer: \[ \boxed{\text{SYN} \rightarrow \text{SYN-ACK} \rightarrow \text{ACK}} \]
Quick Tip: The 3-way handshake establishes a reliable TCP connection between a client and server, ensuring that both sides are ready to send and receive data.
What is the time complexity of the following algorithm? \begin{verbatim int func(int n) { for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { printf("Hello"); \end{verbatim Options:
Step 1: Understanding the Algorithm
- The outer loop runs \( n \) times.
- The inner loop also runs \( n \) times for each iteration of the outer loop.
- The total number of executions of the \texttt{printf statement is \( n \times n = n^2 \). Step 2: Conclusion
- The time complexity is \( O(n^2) \). Final Answer: \[ \boxed{O(n^2)} \] Quick Tip: To determine the time complexity of an algorithm, consider the number of iterations of each loop: - The time complexity is the product of the iterations for nested loops. - For a loop running \( n \) times inside another loop running \( n \) times, the time complexity is \( O(n^2) \).
Consider the following operations on an initially empty stack: Push 10 Push 20 Pop Push 30 Pop Push 40 What is the final content of the stack? Options:
Step 1: Stack Operations Breakdown
- Push 10: Stack = [10]
- Push 20: Stack = [10, 20]
- Pop: Removes 20, Stack = [10]
- Push 30: Stack = [10, 30]
- Pop: Removes 30, Stack = [10]
- Push 40: Stack = [10, 40] Step 2: Conclusion
- The final content of the stack is [10, 40]. Final Answer: \[ \boxed{10, 40} \] Quick Tip: A stack operates on a Last-In, First-Out (LIFO) principle. - When you "push," you add an element to the top of the stack. When you "pop," you remove the top element. - Carefully follow the sequence of push and pop operations to track the stack’s content.
Which of the following is true about the binary search algorithm when applied to a sorted array? Options:
Step 1: Understanding Binary Search
- Binary search works by dividing the search space in half at each step.
- It requires the array to be sorted in ascending order for proper functioning. Step 2: Conclusion
- The correct statement is: "It divides the search space into two equal halves on each iteration." Final Answer: \[ \boxed{3. \text{It divides the search space into two equal halves on each iteration.}} \] Quick Tip: Binary search only works on sorted arrays. - It divides the search space in half each time, making it an efficient \( O(\log n) \) algorithm. - Always ensure that the array is sorted before applying binary search. If the array is unsorted, binary search will not function correctly.

*The article might have information for the previous academic years, please refer the official website of the exam.