CS/IT Gate Yearwise
CS/IT Gate 2026 (Set 2)
CS/IT Gate 2025 (Set 1)
CS/IT Gate 2025 (Set 2)
CS/IT Gate 2024 (Set 1)
CS/IT Gate 2024 (Set 2)
CS/IT Gate 2023
CS/IT Gate 2022
CS/IT Gate 2021 (Set 1)
CS/IT Gate 2021 (Set 2)
CS/IT Gate 2020
CS/IT Gate 2019
CS/IT Gate 2018
CS/IT Gate 2017 (Set 1)
CS/IT Gate 2017 (Set 2)
CS/IT Gate 2016 (Set 1)
CS/IT Gate 2016 (Set 2)
CS/IT Gate 2015 (Set 1)
CS/IT Gate 2015 (Set 2)
CS/IT Gate 2015 (Set 3)
CS/IT Gate 2014 (Set 1)
CS/IT Gate 2014 (Set 2)
CS/IT Gate 2014 (Set 3)
CS and IT Gate 2025 Set-1 Questions with Answer
Ques 40 GATE 2025 SET-1
Ravi had ______ younger brother who taught at ______ university. He was widely regarded as ______ honorable man.
Select the option with the correct sequence of articles to fill in the blanks.
Explanation:
1. First Blank (a): The word "younger" starts with a consonant sound (/j/ or "y" sound). Therefore, the indefinite article "a" is used ("a younger brother").
2. Second Blank (a): The word "university" begins with the vowel letter 'u', but it is pronounced with a consonant sound at the start (/juː/ or "yoo" sound). Because it sounds like it starts with a consonant, we use "a" rather than "an" ("a university").
3. Third Blank (an): The word "honorable" begins with a silent letter 'h'. The actual starting sound is a vowel sound (/ɒ/ or "on-er-able"). Since it begins with a vowel sound, the indefinite article "an" is used ("an honorable man").
Ques 41 GATE 2025 SET-1
The CEO's decision to downsize the workforce was considered myopic because it sacrificed long-term stability to accommodate short-term gains.
Select the most appropriate option that can replace the word "myopic" without changing the meaning of the sentence.
Explanation:
1. Definition of "myopic": The word "myopic" literally means nearsighted in medical terms, but figuratively, it refers to a lack of foresight or long-term planning.
2. Contextual Clues: The sentence explicitly states that the decision "sacrificed long-term stability to accommodate short-term gains." This directly signals that the choice lacked long-term perspective.
3. Option Analysis:
• shortsighted: Perfectly mirrors the meaning of lacking foresight or focusing only on the immediate present.
• visionary: Means having or showing clear, imaginative ideas about the future (the exact opposite of the context).
• progressive: Means favoring or implementing social reform or new, liberal ideas.
• innovative: Means introducing new ideas or original and creative methods.
Ques 42 GATE 2025 SET-1
The average marks obtained by a class in an examination were calculated as 30.8. However, while checking the marks entered, the teacher found that the marks of one student were entered incorrectly as 24 instead of 42. After correcting the marks, the average becomes 31.4. How many students does the class have?
Explanation:
1. Identify the Change in Total Marks: The student's marks were mistakenly entered as 24 instead of 42.
Difference = Correct Marks - Incorrect Marks
Difference = 42 - 24 = 18 marks
• This means the total sum of marks for the class must increase by 18 after correction.
2. Identify the Change in Average Marks:
Increase in Average = New Average - Old Average
Increase in Average = 31.4 - 30.8 = 0.6
3. Calculate the Total Number of Students: Let the total number of students in the class be N.
Increase in Total Marks = N × Increase in Average
18 = N × 0.6
N = 18 / 0.6 = 30
4. Conclusion: The class has exactly 30 students.
Ques 43 GATE 2025 SET-1
Consider the relationships among P, Q, R, S, and T:
• P is the brother of Q.
• S is the daughter of Q.
• T is the sister of S.
• R is the mother of Q.
The following statements are made based on the relationships given above.
(1) R is the grandmother of S.
(2) P is the uncle of S and T.
(3) R has only one son.
(4) Q has only one daughter.
Which one of the following options is correct?
Explanation:
1. Analyze the Given Relationships:
• P is the brother of Q: P is Male. P and Q are siblings.
• S is the daughter of Q: S is Female. Q is the parent of S.
• T is the sister of S: T is Female. Both S and T are children of Q.
• R is the mother of Q: R is Female. Since P and Q are siblings, R is the mother of both P and Q.
2. Evaluate Statement (1): R is the grandmother of S.
• R is the mother of Q, and Q is the parent of S. Therefore, R is indeed the grandmother of S. (True)
3. Evaluate Statement (2): P is the uncle of S and T.
• P is the brother of their parent Q, and P is male. Therefore, P is the uncle of both S and T. (True)
4. Evaluate Statement (3): R has only one son.
• We know P is a son of R. However, the gender of Q is not mentioned in the problem (Q could be male or female). We cannot definitively say R has only one son. (False / Cannot be determined)
5. Evaluate Statement (4): Q has only one daughter.
• Both S and T are daughters of Q. Thus, Q has at least two daughters. (False)
6. Conclusion: Since statements (1) and (2) are definitively true, option (a) is the correct choice.
Ques 44 GATE 2025 SET-1
According to the map shown in the figure, which one of the following statements is correct?
Note: The figure shown is representative.

Explanation:
1. Analyze the Compass: The map provides a standard direction key in the bottom-right corner where North (N) is Up, South (S) is Down, West (W) is Left, and East (E) is Right.
2. Evaluate Statement (a): The library is located directly West of the canteen, not northwest. (Incorrect)
3. Evaluate Statement (b): The hospital is located directly North (across 5th Cross Road) of the chemistry lab, not east. (Incorrect)
4. Evaluate Statement (c): Look at the positions relative to each other:
• The physics lab is in the northwest quadrant (top-left).
• The chemistry lab is in the southeast quadrant (bottom-right).
• Moving from the physics lab to the chemistry lab requires moving Down (South) and Right (East). Therefore, the chemistry lab is indeed to the southeast of the physics lab. (Correct)
5. Evaluate Statement (d): The classrooms are in the southwest corner and the canteen is in the northeast corner. They are diagonally opposite each other and not next to each other. (Incorrect)
Ques 45 GATE 2025 SET-1
""I put the brown paper in my pocket along with the chalks, and possibly other things. I suppose every one must have reflected how primeval and how poetical are the things that one carries in one's pocket: the pocket-knife, for instance the type of all human tools, the infant of the sword. Once I planned to write a book of poems entirely about the things in my pocket. But I found it would be too long: and the age of the great epics is past.""
(From G.K. Chesterton's ""A Piece of Chalk"")
Based only on the information provided in the above passage, which one of the following statements is true?
Explanation:
1. Evaluate Option (a): The passage states "every one must have reflected how primeval...", using the word "reflected" to mean thought or deeply considered. It does not mention carrying a physical mirror. (Incorrect)
2. Evaluate Option (b): The text specifies that the author "planned to write a book of poems entirely about the things in my pocket," not a poem about epics themselves. (Incorrect)
3. Evaluate Option (c): The text explicitly and literally states: "...the pocket-knife, for instance the type of all human tools, the infant of the sword." This perfectly matches the statement. (Correct)
4. Evaluate Option (d): The author states that his intended book of pocket-poems would be "too long" and notes that "the age of the great epics is past." He does not define epics as being inherently "inconvenient" to write. (Incorrect)
Ques 46 GATE 2025 SET-1
In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and line QR. What is the ratio of the area of the triangle PST to the area of the trapezium SQRT?
Note: The figure shown is representative.

Explanation:
1. Understand the Given Distance Conditions:
• The shortest distance from a point to a line is the perpendicular height.
• Let the total height of the large triangle PQR (perpendicular distance from P to QR) be H.
• The problem states that the distance between parallel lines ST and QR is half of this total distance. Therefore, the height of the trapezium SQRT is H/2.
• This leaves the remaining height for the small triangle PST to be: H - H/2 = H/2.
2. Use the Property of Similar Triangles:
• Since ST is parallel to QR, triangle PST is similar to triangle PQR (ΔPST ∼ ΔPQR).
• The ratio of the heights of these two similar triangles is:
Height of ΔPST / Height of ΔPQR = (H/2) / H = 1/2
• Since the ratio of their corresponding heights is 1/2, the ratio of their areas must be the square of the scale factor:
Area(ΔPST) / Area(ΔPQR) = (1/2)2 = 1/4
3. Determine the Area Breakdown:
• Let the total area of the large triangle PQR be 4 units.
• Then, the area of the smaller top triangle PST is exactly 1 unit.
• The area of the bottom trapezium SQRT is the remaining area:
Area(Trapezium SQRT) = Area(ΔPQR) - Area(ΔPST) = 4 - 1 = 3 units.
4. Calculate the Required Ratio:
• The question asks for the ratio of the area of triangle PST to the area of trapezium SQRT:
Ratio = Area(ΔPST) / Area(Trapezium SQRT) = 1/3
Ques 47 GATE 2025 SET-1
A fair six-faced dice, with the faces labelled '1', '2', '3', '4', '5', and '6', is rolled thrice. What is the probability of rolling '6' exactly once?
Explanation:
1. Identify Single-Trial Probabilities:
• Probability of rolling a '6' on a single roll, p = 1/6
• Probability of not rolling a '6' on a single roll, q = 1 - 1/6 = 5/6
2. Determine the Structure of the Target Outcome:
We are looking for the probability of getting exactly one '6' in three rolls. This specific outcome can happen in three different arrangements:
• Arrangement 1: ('6', 'Not 6', 'Not 6') → Probability = (1/6) × (5/6) × (5/6) = 25/216
• Arrangement 2: ('Not 6', '6', 'Not 6') → Probability = (5/6) × (1/6) × (5/6) = 25/216
• Arrangement 3: ('Not 6', 'Not 6', '6') → Probability = (5/6) × (5/6) × (1/6) = 25/216
3. Alternative Binomial Method:
Using the Binomial Probability formula, P(X = k) = nCk × pk × qn - k, where:
• n = 3 (number of trials)
• k = 1 (number of desired successes)
P(X = 1) = 3C1 × (1/6)1 × (5/6)2
P(X = 1) = 3 × (1/6) × (25/36)
P(X = 1) = 3 × (25/216) = 75/216
4. Conclusion: The total probability of rolling '6' exactly once is 75/216.
Ques 48 GATE 2025 SET-1
A square paper, shown in figure (I), is folded along the dotted lines as shown in the figures (II) and (III). Then a few cuts are made as shown in figure (IV). Which one of the following patterns will be obtained when the paper is unfolded?
Note: The figures shown are representative.

Explanation:
1. Analyze the Folding Process:
• Step 1 (Figure II): The square paper is folded diagonally from the top-left to the bottom-right corner. The upper-right half is flipped down over the bottom-left half.
• Step 2 (Figure III): The resulting triangle is folded in half again along a line from the top-right corner down to the longest edge (the main diagonal crease). The left corner is flipped over to the right, forming a smaller, inverted right-angled isosceles triangle shown in Figure (IV).
2. Analyze the Cuts in Figure (IV):
• Triangle cut: Placed along the upper, horizontal edge. This edge represents the outer boundaries of the original square paper (specifically, the top and right outer edges).
• L-shaped cut: Placed on the left edge of the triangle, which lies directly on the main diagonal crease of the square.
• Rectangle/Square cut: Placed on the right edge, which represents the secondary crease inside the paper.
3. Trace the Unfolding of the Triangle Cut:
• The triangle cut is on the outer horizontal edge. When the paper is unfolded completely, this edge unfolds onto all four outer borders of the square.
• Since the tip of the triangle punch points upward (out of the paper's edge), unfolding it creates a single triangular notch on each outer edge with its apex pointing toward the center of the square.
• Looking closely at the top and bottom edges of the options: in (a) and (b), the top triangle points up (outward) and the bottom triangle points down (outward). In (c), they point inward. Therefore, (c) is eliminated.
4. Trace the Unfolding of the L-Shaped Cut:
• The L-shaped punch is placed on the left side of the triangle in Figure (IV). This side maps directly to the diagonal crease running from the top-left corner to the bottom-right corner of the original square.
• Unfolding an L-shape over a line of symmetry creates an asymmetric or corner-like punch. Specifically, it forms two separate corner hooks facing each other along the diagonal axis (one in the top-right corner region and one in the bottom-left corner region).
• This matches options (a), (b), and (c) perfectly.
5. Trace the Unfolding of the Rectangle Cut:
• The small horizontal rectangle is punched on the right side of the triangle in Figure (IV).
• When unfolded across the secondary crease line, the rectangle mirrors perfectly to form a small, standard square oriented parallel to the square's outer edges.
• Crucially, when the paper is unfolded completely, these shapes land in the top-left and bottom-right quadrants. Because the original cut was purely horizontal and vertical, it remains a standard square (■). It does not tilt to become a diamond (◆).
• This eliminates option (b) (which shows diamonds) and leaves option (a) as the only correct arrangement.
6. Conclusion: Option (a) precisely matches the geometry of all unfolded cuts.
Ques 49 GATE 2025 SET-1
A shop has 4 distinct flavors of ice-cream. One can purchase any number of scoops of any flavor. The order in which the scoops are purchased is inconsequential. If one wants to purchase 3 scoops of ice-cream, in how many ways can one make that purchase?
Explanation:
1. Identify the Type of Problem:
• There are n = 4 distinct flavors available.
• We need to choose r = 3 scoops.
• Since we can choose the same flavor multiple times, repetition is allowed.
• Since the order of the scoops is inconsequential, this is a combinations problem with repetition (also known as the "Stars and Bars" or "Multichoose" problem).
2. Apply the Formula:
The number of ways to choose r items from a set of n distinct items with repetition allowed is given by the formula:
n + r - 1Cr
3. Substitute the Values:
• n = 4 (flavors)
• r = 3 (scoops)
Number of ways = 4 + 3 - 1C3 = 6C3
4. Calculate the Combination:
6C3 = (6 × 5 × 4) / (3 × 2 × 1) = 120 / 6 = 20
5. Conclusion: There are exactly 20 different ways to purchase the 3 scoops of ice-cream.
Ques 50 GATE 2025 SET-1
Consider a demand paging memory management system with 32-bit logical address, 20-bit physical address, and page size of 2048 bytes. Assuming that the memory is byte addressable, what is the maximum number of entries in the page table?
Explanation:
1. Identify Given Parameters:
• Logical Address Space (LAS) size = 32 bits
• Page Size = 2048 bytes = 211 bytes (since 211 = 2048)
2. Understand Page Table Entries:
The number of entries in a page table is determined by the total number of pages in the Logical Address Space. Each page requires exactly one entry in the page table.
3. Calculate Page Offset:
Since the memory is byte-addressable and the page size is 211 bytes, the number of bits required for the page offset (offset within a page) is 11 bits.
4. Calculate Number of Page Bits:
The logical address is split into two parts: Page Number bits and Page Offset bits.
• Logical Address (32 bits) = Page Number bits + Page Offset bits (11 bits)
• Page Number bits = 32 - 11 = 21 bits
5. Calculate Maximum Number of Entries:
With 21 bits allocated for the page number, the maximum number of unique pages (and therefore the maximum number of entries in the page table) is:
221
Note: If option (a) was meant to represent 221, then option (a) is the correct choice. Written as plain integers, 221 is the exact capacity.
Ques 51 GATE 2025 SET-1
Suppose in a multiprogramming environment, the following C program segment is executed. A process goes into I/O queue whenever an I/O related operation is performed. Assume that there will always be a context switch whenever a process requests for an I/O, and also whenever the process returns from an I/O. The number of times the process will enter the ready queue during its lifetime (not counting the time the process enters the ready queue when it is run initially) is ______ (Answer in integer)

Explanation:
To determine how many times the process enters the ready queue during its lifetime (excluding its initial entry), we need to track every time it transitions from the Waiting/Blocked (I/O) State back to the Ready State.
1. Identify the I/O Operations in the Code:
There are two standard library functions in the code segment that perform I/O operations:
• scanf("%d", &x); — Executed 1 time before entering the loop.
• printf("%d\n", x); — Executed inside a for loop that runs exactly 20 times (from i = 0 to i < 20). Therefore, this is executed 20 times.
Total number of I/O operation requests = 1 + 20 = 21.
2. Analyze State Transitions for Each I/O:
According to the problem constraints:
• A process goes into the I/O queue whenever an I/O operation is performed.
• A context switch occurs whenever the process requests an I/O (moving from Running → Waiting).
• A context switch also occurs whenever the process returns from an I/O (moving from Waiting → Ready).
Each of the 21 I/O requests follows this lifecycle sequence:
Running → (Requests I/O) → I/O Queue (Waiting) → (I/O Completes) → Ready Queue → Running
3. Calculate Total Entries into the Ready Queue:
• The scanf statement causes the process to enter the ready queue exactly 1 time after its I/O completes.
• The printf statement inside the loop causes the process to enter the ready queue exactly 20 times across all iterations.
Total entries into the ready queue = 1 + 20 = 21.
Ques 52 GATE 2025 SET-1
A computer has two processors, M1 and M2. Four processes P1, P2, P3, P4 with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows:
• M1 uses priority of execution for the processes as, P1>P3>P2>P4 i.e., P1 and P4 have highest and lowest priorities, respectively.
• M2 uses priority of execution for the processes as, P2>P3>P4>P1, i.e., P2 and P1 have highest and lowest priorities, respectively.
A process Pi is scheduled to a processor Mk, if the processor is free and no other process Pj is waiting with higher priority. At any given point of time, a process can be allocated to any one of the free processors without violating the execution priority rules. Ignore the context switch time. What will be the average waiting time of the processes in milliseconds?
Explanation:
Let us re-verify the step-by-step scheduling execution to ensure absolute alignment with the non-preemptive priority rules for both processors.
1. At Time t = 0 ms:
• Both processors M1 and M2 are free, and all processes {P1, P2, P3, P4} are in the ready pool.
• Processor M1 selects its highest priority available process, which is P1 (Burst = 20 ms). P1 runs on M1 from t = 0 to t = 20.
• Processor M2 selects its highest priority available process among the remaining pool {P2, P3, P4}, which is P2 (Burst = 16 ms). P2 runs on M2 from t = 0 to t = 16.
2. At Time t = 16 ms:
• Processor M2 finishes P2 and becomes free. The remaining unallocated processes are {P3, P4}.
• According to M2's priority rules (P3 > P4), it schedules P3 (Burst = 25 ms). P3 runs on M2 from t = 16 to t = 41.
3. At Time t = 20 ms:
• Processor M1 finishes P1 and becomes free.
• The only remaining unallocated process in the system is P4 (Burst = 10 ms). M1 schedules P4, running from t = 20 to t = 30.
---
4. Calculate individual process waiting times:
• Waiting time for P1 = 0 - 0 = 0 ms
• Waiting time for P2 = 0 - 0 = 0 ms
• Waiting time for P3 = 16 - 0 = 16 ms
• Waiting time for P4 = 20 - 0 = 20 ms
5. Calculate the Average Waiting Time:
• Average Waiting Time = (0 + 0 + 16 + 20) / 4 = 36 / 4 = 9.00 ms
The mathematically verified average waiting time is exactly 9.00 ms, which makes option (a) the correct choice.
Total Unique Visitors