# GATE CS practice set · 27 October 2026

10 original GATE CS & IT questions from GATE Daily, 14 marks, about 19 minutes. Solve them on the page: https://gatedaily.in/daily/2026-10-27/

Scoring follows GATE: a wrong 1-mark MCQ costs 1/3 mark and a wrong 2-mark MCQ costs 2/3. MSQ and NAT have no negative marking and no partial credit (an MSQ is right only with exactly the right options). Skipped scores zero.

Solutions: each question's answer and worked solution is at the link under it.

### Q.1 · General Aptitude · Arithmetic · MCQ, 1 mark (choose one option)

In a hostel, every resident prefers exactly one of tea and coffee, and the ratio of tea drinkers to coffee drinkers is $5 : 3$. Then 12 new residents, all coffee drinkers, move in and 5 tea drinkers move out. The ratio of tea drinkers to coffee drinkers is now $5 : 4$.

How many tea drinkers were there in the hostel originally?

(A) 60
(B) 75
(C) 80
(D) 128

Solution: https://gatedaily.in/q/2026-10-27-tea-coffee-ratio-after-change.md

### Q.2 · Engineering Mathematics · Matrices and determinants · NAT, 2 marks (answer with a number)

Let $A$ be a real $3 \times 3$ matrix with $\det(A) = 6$. A matrix $B$ is obtained from $A$ by applying the following row operations in order:

1. interchange row 1 and row 3;
2. multiply row 2 by 3;
3. replace row 3 by (row 3 $+ \; 5 \times$ row 1).

The value of $\det\left(3\, B^{-1} A^{T}\right)$ is ________. (answer in integer)

Solution: https://gatedaily.in/q/2026-10-27-determinant-after-row-operations.md

### Q.3 · Discrete Mathematics · Relations, partial orders and lattices · NAT, 1 mark (answer with a number)

Let $S = \{1, 2, 3, 4, 5\}$ and let $P$ be the partial order on $S$ given by

$$P = \{(x, x) \mid x \in S\} \cup \{(1,2), (1,3), (2,4), (3,4), (1,4), (5,4)\},$$

where $(x, y) \in P$ means $x \preceq y$. A total order on $S$ *contains* $P$ if every pair of $P$ is also a pair of the total order.

The number of total orders on $S$ that contain $P$ is ________.

Solution: https://gatedaily.in/q/2026-10-27-linear-extensions-diamond-poset.md

### Q.4 · Computer Organization & Architecture · Main memory and secondary storage · MCQ, 2 marks (choose one option)

A disk rotates at 12000 rpm and has 500 sectors per track. Moving the head from a track to an adjacent track takes 0.5 ms, and seek time is proportional to the number of tracks crossed. The head is initially on track 20. A request reads, in this order:

1. 6 randomly located sectors on track 35;
2. a run of 200 consecutive sectors on track 10;
3. 6 randomly located sectors on track 50.

Assume that each randomly located sector is preceded by an average rotational latency of half a rotation; the run of consecutive sectors is preceded by one such average latency and is then read in a single sweep; reading one sector takes $\frac{1}{500}$ of a rotation; and all other overheads are zero.

The total time to serve the request, in milliseconds, is

(A) 49.62
(B) 67.12
(C) 74.62
(D) 107.12

Solution: https://gatedaily.in/q/2026-10-27-disk-read-random-and-sequential-sectors.md

### Q.5 · Programming & Data Structures · Pointers and dynamic memory · MCQ, 1 mark (choose one option)

Assume `int` is 4 bytes. What does the following C program print?

```c
#include <stdio.h>
int main(void) {
    int a[6] = {4, 9, 2, 7};
    int *p = a + 3;
    int *q = &a[1];
    *q += *p;
    p--;
    *p = p - q;
    printf("%d %d %d", a[1], a[2], *(q + 3));
    return 0;
}
```

(A) 16 1 0
(B) 16 4 0
(C) 16 1 7
(D) 11 1 0

Solution: https://gatedaily.in/q/2026-10-27-pointer-difference-assigned-to-array.md

### Q.6 · Theory of Computation · Context-free grammars · MCQ, 2 marks (choose one option)

Consider the following two context-free grammars over the terminal alphabet $\{a, b\}$. In each grammar $S$ is the only non-terminal and the start symbol, and $\epsilon$ denotes the empty string.

$$G_1:\quad S \to aSbb \mid aS \mid \epsilon$$

$$G_2:\quad S \to aSb \mid aS \mid Sb \mid \epsilon$$

Which one of the following statements is CORRECT?

(A) $L(G_1) = \{a^m b^{2n} \mid m \ge n \ge 0\}$ and $L(G_2)$ is regular
(B) $L(G_1) = \{a^m b^{2n} \mid m \ge n \ge 0\}$ and $L(G_2)$ is context-free but not regular
(C) $L(G_1) = \{a^m b^{2n} \mid n \ge m \ge 0\}$ and $L(G_2)$ is regular
(D) $L(G_1) = \{a^m b^{2n} \mid n \ge m \ge 0\}$ and $L(G_2)$ is context-free but not regular

Solution: https://gatedaily.in/q/2026-10-27-two-grammars-language-and-regularity.md

### Q.7 · Compiler Design · Bottom-up parsing · MCQ, 2 marks (choose one option)

Consider the context-free grammar $G$ with start symbol $S$, non-terminals $\{S, A, B\}$ and terminals $\{a, b, c, d\}$:

$$S \to A\,a \mid B\,b \mid c\,A\,b$$
$$A \to d$$
$$B \to d$$

Which ONE of the following statements is TRUE?

(A) G is SLR(1), and hence also LALR(1)
(B) G is LALR(1) but not SLR(1)
(C) G is CLR(1) but not LALR(1)
(D) G is not CLR(1)

Solution: https://gatedaily.in/q/2026-10-27-lalr-but-not-slr-reduce-reduce.md

### Q.8 · Operating Systems · Processes, threads and system calls · MSQ, 1 mark (choose every correct option)

A single process has several threads. Which of the following are shared by all the threads of this process?

(A) Global variables in the data segment
(B) The value of the stack pointer
(C) The table of open file descriptors
(D) The contents of the general-purpose registers

Solution: https://gatedaily.in/q/2026-10-27-what-threads-of-a-process-share.md

### Q.9 · Databases · File organization and indexing · MCQ, 1 mark (choose one option)

A relation $R(A, B, C)$ is stored as a data file sorted on attribute $A$; the file is not sorted on $B$. A *sparse* index has entries for only some search-key values (for example, one entry per data block), and a lookup for a key that has no entry uses the entry with the largest indexed key not greater than it.

Which one of the following indexes on this file can be sparse?

(A) A B+ tree index on A
(B) A B+ tree index on B
(C) A hash index on A
(D) A hash index on B

Solution: https://gatedaily.in/q/2026-10-27-which-index-can-be-sparse.md

### Q.10 · Computer Networks · IP fragmentation · MCQ, 1 mark (choose one option)

A host sends one UDP datagram carrying 2928 bytes of application data over IPv4. The UDP header is 8 bytes and every IPv4 header is 20 bytes (no options). The datagram must cross a link whose MTU is 1000 bytes, including the IP header. The DF bit is not set. Assume the router fragments greedily: while the remaining data does not fit in one fragment, it emits the largest fragment allowed and repeats on the rest; once the remaining data fits within the MTU, it sends it as the last fragment.

Which ONE of the following gives the number of IP fragments and the fragment offset field value of the last fragment?

(A) 3 fragments, offset 244
(B) 3 fragments, offset 245
(C) 4 fragments, offset 366
(D) 4 fragments, offset 2928

Solution: https://gatedaily.in/q/2026-10-27-udp-fragments-last-offset.md
