The GATE 2026 Computer Science and Information Technology (CS-1) master question paper is available here with detailed solutions. GATE 2026 CS-1 was conducted by IIT Guwahati on February 8, 2026, from 9:30 AM to 12:30 PM, as a 65-question computer-based test for 100 marks.

GATE 2026 CS-1 Question Paper with Solutions Download PDF Check Solutions

GATE 2026 CS-1 Master Paper Questions with Solutions

Question 1:

The antonym of the word protagonist is .

  • (A) agnostic
  • (B) antagonist
  • (C) arsonist
  • (D) anarchist

Question 2:

The figure shows two 4-tile patterns.

Either one or both of the patterns can be used any number of times and in any orientation to construct a new pattern. Which one of the options below cannot be constructed by using only these two 4-tile patterns, assuming there are no overlaps among them?

  • (A)
  • (B)
  • (C)
  • (D)

Question 3:

Consider a knock-out women’s badminton singles tournament where there are no ties. The loser in each game is eliminated. Every player plays until she is defeated or remains the last undefeated player, who is declared the winner. If there are 64 players initially, how many games are played in total?

  • (A) 127
  • (B) 64
  • (C) 63
  • (D) 32

Question 4:

A student must enroll for at least 60 credits and no more than 70 credits. Credits are divided among project, core, specialization, and elective courses. Exactly 15 core credits and exactly 20 project credits are compulsory, and at least 10 specialization credits are required. The maximum elective credits possible is .

  • (A) 10
  • (B) 15
  • (C) 20
  • (D) 25

Question 5:

‘When the teacher is in the room, all students stand silently.’ If this statement is true, which one of the following statements is not necessarily true?

  • (A) If any student is not standing silently, then the teacher is not in the room.
  • (B) When the teacher is in the room, all students are silent.
  • (C) If all students are standing, then the teacher is in the room.
  • (D) When the teacher is in the room, all students are standing.

Question 6:

Combinatorics deals with counting problems, such as distinct arrangements of objects on a circle. This kind of counting is sometimes used in modeling physical phenomena. Often, in such models, probabilities are assigned to combinatorial possibilities, enabling computation of average physical quantities.

P: Combinatorics is always invoked in modeling physical phenomena.
Q: Modeling some physical phenomena involves assigning probabilities to combinatorial possibilities to compute average physical quantities.
What can be inferred about P and Q?

  • (A) P is False and Q is False
  • (B) P is False and Q is True
  • (C) P is True and Q is False
  • (D) P is True and Q is True

Question 7:

In Panel I, the front view and top view of a structure are shown. Which 3D structure in Panel II possesses those views?

  • (A) (i)
  • (B) (ii)
  • (C) (iii)
  • (D) (iv)

Question 8:

For positive real \(S,K\), \(H_K(S)=\max(S-K,0)\), where \(\max(a,b)=a\) when \(a>b\) and \(b\) when \(a\le b\). The graph shows \(N(S)\) versus \(S\). Express \(N(S)\).

  • (A) \(H_{10}(S)-H_{20}(S)\)
  • (B) \(H_{10}(S)-2H_{20}(S)\)
  • (C) \(-H_{10}(S)+H_{20}(S)\)
  • (D) \(H_{15}(S)-H_{20}(S)\)

Question 9:

In the 2020 summer Olympics javelin final, Neeraj Chopra won gold, Jakub Vadlejch silver, and Vitezlav Vesely bronze. There were six rounds, with one throw per athlete per round; each athlete's best throw determined the medal. (i) Neeraj dominated rounds 1 and 2, with his gold performance in round 2, while the other two had no medal-winning throws there. (ii) Jakub's and Vitezlav's round-6 throws were fouls. (iii) After four rounds Vitezlav was second and could not improve his best in later rounds. (iv) Jakub's throw was the best in round 4. In which round did Vitezlav have his best throw?

  • (A) Third
  • (B) Fourth
  • (C) Fifth
  • (D) Sixth

Question 10:

An unbiased six-faced die marked 1 through 6 is rolled twice. What is the probability that the second number is an integer multiple of the first number?

  • (A) \(\frac16\)
  • (B) \(\frac5{18}\)
  • (C) \(\frac7{18}\)
  • (D) \(\frac56\)

Question 11:

An urn contains one red ball and one blue ball. At each step, a ball is picked uniformly at random, and that ball together with another ball of the same color is put back. What is the probability that the numbers of red and blue balls are equal after two steps?

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

Question 12:

Consider \(4\times4\) matrices whose elements belong to \(\{0,1\}\). How many such matrices have an even number of 1s in every row and every column?

  • (A) 512
  • (B) 1025
  • (C) 1023
  • (D) 255

Question 13:

For \(n>1\), what is the maximum multiplicity of any eigenvalue of an \(n\times n\) matrix with real elements?

  • (A) \(n\)
  • (B) \(n-1\)
  • (C) 1
  • (D) \(n+1\)

Question 14:

Match the addressing modes in List I with high-level-language data elements in List II:
P. Immediate; Q. Indirect; R. Base with index; S. Base with offset/displacement.
1. Element of an array; 2. Pointer; 3. Element of a record; 4. Constant.

  • (A) P–4, Q–3, R–1, S–2
  • (B) P–4, Q–2, R–1, S–3
  • (C) P–1, Q–4, R–3, S–2
  • (D) P–2, Q–3, R–1, S–4

Question 15:

Processor P has a load-store instruction-set architecture. The first operand of every instruction is the destination. Which instruction sequence implements the high-level statement Z = X + Y? X, Y, Z are memory operands; R0, R1, R2 are registers.

  • (A) ADD Z, X, Y
  • (B) LOAD R0, X
    ADD Z, R0, Y
  • (C) ADD R0, X, Y
    STORE Z, R0
  • (D) LOAD R0, X
    LOAD R1, Y
    ADD R2, R0, R1
    STORE Z, R2

Question 16:

Which dependency among register operands of different instructions can cause a data hazard in a pipelined processor?

  • (A) Read-after-read
  • (B) Read-after-write
  • (C) Write-after-read
  • (D) Write-after-write

Question 17:

For \(n>1\), \(T_1(n)=4T_1(n/2)+T_2(n)\) and \(T_2(n)=5T_2(n/4)+\Theta(\log_2 n)\). For \(n\le1\), both functions equal 1. Which option is correct?

  • (A) \(T_1(n)=\Theta(n^2)\)
  • (B) \(T_1(n)=\Theta(n^2\log_2 n)\)
  • (C) \(T_1(n)=\Theta(n^{\log_4 5})\)
  • (D) \(T_1(n)=\Theta(n^{\log_4 5}\log_2 n)\)

Question 18:

For a TCP connection between a client and a server, which statement is true?

  • (A) The client and server use a two-way handshake before data transmission.
  • (B) The server cannot initiate closing before the client initiates closing.
  • (C) The TCP connection is half-duplex.
  • (D) The client and server can initiate closing at the same time.

Question 19:

Which statements are true about a web browser interacting with a web server using HTTP/1.1?

  • (A) HTTP/1.1 facilitates downloading multiple objects of the same webpage over the same TCP connection if the objects are on the same server.
  • (B) HTTP/1.1 facilitates downloading multiple objects of the same webpage over the same TCP connection even if they are on different servers.
  • (C) HTTP/1.1 facilitates sending a request for one object without waiting for a previously requested object to be downloaded completely.
  • (D) HTTP/1.1 facilitates downloading multiple webpages on the same server over a single TCP connection.

Question 20:

Let \(n>1\), and let \(M\) be an \(n\times n\) real matrix. The vector \((0,1,0,0,\ldots,0)\in\mathbb R^n\) belongs to the null space of \(M\). Which options are always correct?

  • (A) Determinant of \(M\) is 1
  • (B) Determinant of \(M\) is 0
  • (C) Rank of \(M\) is 1
  • (D) There are at least two non-zero vectors in the null space of \(M\)

Question 21:

Consider \(F(P,Q)=(\overline P+Q)\oplus(\overline P Q)\). Which expressions are equivalent to \(F\)?

  • (A) \(\overline{P\oplus Q}\)
  • (B) \(P\oplus Q\)
  • (C) \(\overline P\oplus Q\)
  • (D) \(\overline P\oplus\overline Q\)

Question 22:

Eight-bit signed integers \(X,Y,Z\) use sign-magnitude representation. \(X=10110100\) and \(Y=01001100\). Which operations to compute \(Z\) result in arithmetic overflow?

  • (A) \(Z=X+Y\)
  • (B) \(Z=X-Y\)
  • (C) \(Z=-X+Y\)
  • (D) \(Z=-X-Y\)

Question 23:

Let \(n\) be odd and greater than 100. A binary minheap with \(n\) elements is stored in an array \(P\) indexed from 1. Which indices do not correspond to leaf nodes?

  • (A) \((n+1)/2\)
  • (B) \((n-1)/2\)
  • (C) \((n-3)/2\)
  • (D) \(n\)

Question 24:

A hash table \(P[0,1,\ldots,10]\) is initially empty and uses open addressing with linear probing. The hash function is \(h(x)=(x+7)\bmod11\). Insert \(1,13,22,15,11,24\) in that order. Which listed positions are empty afterward?

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

Question 25:

Consider the grammar with start symbol \(S\) and terminals \(a,b\): \(S\to aSbS\mid bS\mid\epsilon\). Which statements are true?

  • (A) The grammar is ambiguous.
  • (B) The string \(abb\) has two distinct derivations in this grammar.
  • (C) The string \(abab\) has only one rightmost derivation.
  • (D) The language generated by the grammar is undecidable.

Question 26:

Let \(M\) be an NFA with 6 states over a finite alphabet. Which options cannot be the number of states in the minimal equivalent DFA?

  • (A) 32
  • (B) 65
  • (C) 1
  • (D) 128

Question 27:

Consider the C statements:

char *str1 = "Hello;     /* Statement S1 */
char *str2 = "Hello;";   /* Statement S2 */
int *str3 = "Hello";     /* Statement S3 */
Which options are correct?

  • (A) S1 and S2 have syntactic errors.
  • (B) S2 has a lexical error and S3 has a syntactic error.
  • (C) S1 has a lexical error and S3 has a semantic error.
  • (D) S1 has a syntactic error and S3 has a semantic error.

Question 28:

Which statements about LL(1) parsing are true?

  • (A) An LL(1) parser uses backtracking.
  • (B) For a grammar to be LL(1), it must be left-recursive.
  • (C) For a grammar to be LL(1), it must be left-factored.
  • (D) LL(1) parsers are more powerful than SLR parsers.

Question 29:

With respect to operating-system deadlocks, which statements are false?

  • (A) Banker’s algorithm is used to prevent deadlocks.
  • (B) Deadlock formation can be prevented by disallowing the hold-and-wait condition.
  • (C) An assignment edge in a resource-allocation graph is directed from a process to a resource.
  • (D) A safe state guarantees that all processes can finish without deadlock formation.

Question 30:

Let \(P,Q,R,S\) be relation attributes and \(X\to Y\) denote a functional dependency. Which options are always true?

  • (A) If \((\{P,Q\}\to\{R\}\ \text{and}\ \{P\}\to\{R\})\), then \(\{Q\}\to\{R\}\).
  • (B) If \(\{P,Q\}\to\{R\}\), then \((\{P\}\to\{R\}\ \text{or}\ \{Q\}\to\{R\})\).
  • (C) If \((\{P\}\to\{R\}\ \text{and}\ \{Q\}\to\{S\})\), then \(\{P,Q\}\to\{R,S\}\).
  • (D) If \(\{P\}\to\{R\}\), then \(\{P,Q\}\to\{R\}\).

Question 31:

In relational-database normalization, which statements are true?

  • (A) It is always possible to obtain a dependency-preserving 3NF decomposition of a relation.
  • (B) It is always possible to obtain a dependency-preserving 1NF decomposition of a relation.
  • (C) It is not always possible to obtain a dependency-preserving BCNF decomposition of a relation.
  • (D) It is not always possible to obtain a dependency-preserving 2NF decomposition of a relation.

Question 32:

Consider \(f:\mathbb R\to\mathbb R\) defined by \[f(x)=\begin{cases}c_1e^x-c_2\log_e(1/x),&x>0,\\3,&\text{otherwise},\end{cases}\] where \(c_1,c_2\in\mathbb R\). If \(f\) is continuous at \(x=0\), find \(c_1+c_2\). (Answer in integer.)


Question 33:

The height of a binary tree is the number of edges in its longest root-to-leaf path. What is the maximum possible height of a full binary tree with 23 nodes? (Answer in integer.)


Question 34:

Consider the C program:

#include <stdio.h>

void func(int i, int j) {
  if (i < j) {
    int i = 0;
    while (i < 10) {
      j += 2;
      i++;
    }
  }
  printf("%d", i);
}

int main() {
  int i = 9, j = 10;
  func(i, j);
  return 0;
}
What is the output? (Answer in integer.) Assume the program compiles and runs successfully.


Question 35:

A system has \(k\) instances of a resource \(R\), shared by 5 processes. Each process requires at most two instances, requests or releases one at a time, and can request its second only after acquiring its first. What is the minimum \(k\) that guarantees freedom from deadlock? (Answer in integer.)


Question 36:

Real-valued variables \(X,Y,Z\) use the IEEE 754 single-precision floating-point format. The binary representations of \(X\) and \(Y\), in hexadecimal, are \(X:\mathtt{35C00000}\) and \(Y:\mathtt{34A00000}\). Let \(Z=X+Y\). Which is the binary representation of \(Z\) in hexadecimal notation?

  • (A) \(\mathtt{35C80000}\)
  • (B) \(\mathtt{35CC0000}\)
  • (C) \(\mathtt{35E80000}\)
  • (D) \(\mathtt{35EC0000}\)

Question 37:

A 2-bit saturating up/down counter counts up when input \(P=0\), and counts down when \(P=1\). It is built as a synchronous sequential circuit using D flip-flops. Its next-state table is:

\(P\)\(Q_1\)\(Q_0\)\(Q_1^+\)\(Q_0^+\)
00001
00110
01011
01111
10000
10100
11001
11110
Which expressions give the D-flip-flop inputs \(D_1,D_0\)?

  • (A) \(D_1=PQ_1+\overline P Q_0+Q_1Q_0,\quad D_0=PQ_0+\overline P Q_1+Q_1\overline{Q_0}\)
  • (B) \(D_1=\overline P Q_1+\overline P Q_0+Q_1Q_0,\quad D_0=\overline P\,\overline{Q_0}+\overline P Q_1+Q_1\overline{Q_0}\)
  • (C) \(D_1=\overline P\,\overline{Q_1}+\overline P Q_0+Q_1Q_0,\quad D_0=\overline P Q_0+\overline P Q_1+Q_1\overline{Q_0}\)
  • (D) \(D_1=P\overline{Q_1}+\overline P Q_0+Q_1Q_0,\quad D_0=P\overline{Q_0}+\overline P Q_1+Q_1\overline{Q_0}\)

Question 38:

A processor has a physical address space of \(2^{32}\) bytes. A cache has capacity \(2^{23}\) bytes and block size 128 bytes. It may be direct mapped or \(K\)-way set associative, where \(K=2^L\) and \(L\in\{1,2,3\}\). Let the TAG length be \(M\) bits for direct mapping and \(N\) bits for set associativity. Which relation is true?

  • (A) \(N=M+L\)
  • (B) \(N=M-L\)
  • (C) \(N=M+K\)
  • (D) \(N=M-K\)

Question 39:

The following C code computes the number of nodes in a non-empty singly linked list pointed to by head:

struct node {
  int elt;
  struct node *next;
};
int getListSize(struct node *head) {
  if (E1) return 1;
  return E2;
}
Which replacements for E1 and E2 are correct?

  • (A) E1: head == NULL; E2: 1 + getListSize(head)
  • (B) E1: head->next == NULL; E2: 1 + getListSize(head->next)
  • (C) E1: head == NULL; E2: 1 + getListSize(head->next)
  • (D) E1: head->next == NULL; E2: 1 + getListSize(head)

Question 40:

Let \(P\) be the integers from 1 to 15. Consider any insertion order into a binary search tree that creates a complete binary tree. Which element can never be the third element inserted?

  • (A) 4
  • (B) 2
  • (C) 10
  • (D) 5

Question 41:

Let \(G(V,E)\) be an undirected edge-weighted graph with integer weights. Path weight is the sum of edge weights, and path length is its number of edges. Fix \(s\in V\). For \(u\in V,k\ge0\), let \(d_k(u)\) be the weight of a shortest path from \(s\) to \(u\) of length at most \(k\), or \(\infty\) if none exists.
S1: For every \(k\ge0,u\in V\), \(d_{k+1}(u)\le d_k(u)\).
S2: For every \((u,v)\in E\), if \((u,v)\) is part of a shortest path by weight from \(s\) to \(v\), then for every \(k\ge0\), \(d_k(u)\le d_k(v)\).
Which option is correct?

  • (A) Only S1 is true
  • (B) Only S2 is true
  • (C) Both S1 and S2 are true
  • (D) Neither S1 nor S2 is true

Question 42:

Consider the control-flow graph shown below.

Which option correctly lists the redundant expressions (common subexpressions) in basic blocks B4 and B5? All variables are integers.

  • (A) B4: \(\{b+i\}\); B5: \(\{c+m\}\)
  • (B) B4: \(\{g*k\}\); B5: \(\{c+m\}\)
  • (C) B4: \(\{g*k,b+i\}\); B5: \(\{\}\)
  • (D) B4: \(\{g*k\}\); B5: \(\{\}\)

Question 43:

A relational schema has \(R(P,Q)\) and \(S(X,Y)\). Let \(E=\{\langle u\rangle\mid\exists v\,\exists w\,\langle u,v\rangle\in R\land\langle v,w\rangle\in S\}\) be a tuple relational calculus expression. Which relational algebra expression is equivalent to \(E\)?

  • (A) \(\Pi_P(R\bowtie_{R.P=S.X}S)\)
  • (B) \(\Pi_P(S\bowtie_{S.X=R.Q}R)\)
  • (C) \(\Pi_P(R\bowtie_{R.P=S.Y}S)\)
  • (D) \(\Pi_P(S\bowtie_{S.Y=R.Q}R)\)

Question 44:

A TCP sender establishes a connection and begins transmitting segments. The slow-start threshold is 10000 segments, the fixed round-trip time is 1 millisecond, the sender always has data, segments are numbered from 1, and none is lost. Let \(t\) milliseconds be the time at which segment 2000 starts transmission. Which range is correct?

  • (A) \(9\le t<10\)
  • (B) \(10\le t<11\)
  • (C) \(11\le t<12\)
  • (D) \(12\le t<13\)

Question 45:

A sliding-window protocol operates over a lossless link with window size \(W\) frames. Each frame is 1000 bits including header, bandwidth is 100 kbps (\(1k=10^3\)), and one-way propagation delay is 100 ms. Processing and acknowledgement transmission times are zero. What minimum \(W\) achieves 100% link utilization?

  • (A) 10
  • (B) 21
  • (C) 20
  • (D) 11

Question 46:

Let \(f:\mathbb R\to\mathbb R\) be defined by \(f(x)=(|x|/2-x)(x-|x|/2)\). Which statements are true?

  • (A) \(f\) has a local maximum
  • (B) \(f\) has a local minimum
  • (C) \(f'\) is continuous over \(\mathbb R\)
  • (D) \(f'\) is not differentiable over \(\mathbb R\)

Question 47:

Let \(G(V,E)\) be a simple undirected graph. A vertex cover \(V'\subseteq V\) contains an endpoint of every edge. The smallest vertex cover has size \(k\), and \(S\) is any vertex cover of size \(k\). For a vertex \(v\in V\), which constraint always ensures \(v\in S\)?

  • (A) The degree of \(v\) is at least \(k+1\)
  • (B) \(v\) is on a path of length \(k+1\)
  • (C) \(v\) is on a cycle of length \(k+1\)
  • (D) \(v\) is part of a clique of size \(k\)

Question 48:

Consider \(F(P,Q,R,S)=\sum m(1,2,3,4,5,7,10,12,13,14)\). Which options are minimal sum-of-products expressions for \(F\)?

  • (A) \(\overline P S+Q\overline R+\overline P\,\overline Q R+\overline Q R\overline S\)
  • (B) \(\overline P S+Q\overline R+\overline P\,\overline Q R+PR\overline S\)
  • (C) \(\overline P S+Q\overline R+PQ\overline S+PR\overline S\)
  • (D) \(\overline P S+Q\overline R+PQ\overline S+\overline Q R\overline S\)

Question 49:

Let \(G(V,E)\) be a simple undirected edge-weighted graph with unique edge weights. Which statements about its minimum spanning trees are true?

  • (A) In every cycle \(C\), the largest-weight edge in \(C\) is in no MST
  • (B) In every cycle \(C\), the smallest-weight edge in \(C\) is in every MST
  • (C) For every vertex \(v\), the largest-weight edge incident on \(v\) is in no MST
  • (D) For every vertex \(v\), the smallest-weight edge incident on \(v\) is in every MST

Question 50:

Consider the following depth-first-search pseudocode on a directed graph \(G(V,E)\), where \(d[v]\) and \(f[v]\) are the discovery and finishing times of \(v\):

DFS(G):                         Explore(G, v, t):
unmark all v in V mark v
t = 0 t = t + 1
for each v in V d[v] = t
if v is unmarked for each (v, w) in E
t = Explore(G, v, t) if w is unmarked
end if t = Explore(G, w, t)
end for end if
end for
t = t + 1
f[v] = t
return t
Suppose the input graph is a directed acyclic graph. For an edge \((u,v)\in E\), which timing relations can never be correct?

  • (A) \(d[u]<d[v]<f[v]<f[u]\)
  • (B) \(d[v]<d[u]<f[u]<f[v]\)
  • (C) \(d[v]<f[v]<d[u]<f[u]\)
  • (D) \(d[u]<d[v]<f[u]<f[v]\)

Question 51:

Let \(L_1,L_2\) be languages over a finite alphabet such that \(L_1\cap L_2\) and \(L_2\) are regular. Which statements are always true?

  • (A) \(L_1\) is regular
  • (B) \(L_1\cup L_2\) is regular
  • (C) \(L_2\) is context-free
  • (D) \(L_1\) is context-free

Question 52:

Consider the context-free grammar \(S\to abaABA bba\), \(A\to aaBBA b\mid bBabaa\), and \(B\to aBb\mid ab\), with start symbol \(S\), terminals \(a,b\), and nonterminals \(A,B\). For \(s\in L(G)\), let \(n_1(s)\) and \(n_2(s)\) be its counts of \(a\)'s and \(b\)'s. Which statements are true?

  • (A) There exists \(s\in L(G)\) with \(n_1(s)<n_2(s)\)
  • (B) For every \(s\in L(G)\), \(n_1(s)\ge n_2(s)\)
  • (C) There exists \(s\in L(G)\) with \(n_1(s)>2n_2(s)\)
  • (D) For every \(s\in L(G)\), \(n_1(s)\le2n_2(s)\)

Question 53:

Consider two syntax-directed definitions for type declarations.
SDD1: \(D\to TV:\ D.type=T.type,\ V.type=T.type\); \(T\to int:\ T.type=int\); \(T\to float:\ T.type=float\); \(V\to V_1\,id:\ V_1.type=V.type,\ put(id.entry,V.type)\); \(V\to id:\ put(id.entry,V.type)\).
SDD2: \(D\to D_1\,id:\ D.type=D_1.type,\ put(id.entry,D_1.type)\); \(D\to T\,id:\ D.type=T.type,\ put(id.entry,T.type)\); \(T\to int:\ T.type=int\); \(T\to float:\ T.type=float\).
\(D\) is the start symbol. \(int,float,id\) are terminals; \(V_1=V\) and \(D_1=D\), with subscripts distinguishing occurrences. The function \(put\) adds an identifier's type to the symbol table. Let P and Q be the languages of the two grammars. Which statements are true?

  • (A) The languages P and Q are the same
  • (B) SDD2 is S-attributed and contains only synthesized attributes
  • (C) SDD1 is L-attributed and contains only inherited attributes
  • (D) The specifications of SDD1 and SDD2 add the same entries to the symbol table

Question 54:

A system has a physically addressed cache and an MMU with a TLB. When a page is evicted from main memory, its corresponding cache blocks are marked invalid. For one memory reference, which event sequences can never happen?

  • (A) TLB miss, page-table hit, cache hit
  • (B) TLB hit, page-table miss, cache hit
  • (C) TLB miss, page-table miss, cache hit
  • (D) TLB miss, page-table miss, cache miss

Question 55:

An undirected unweighted simple graph \(G(V,E)\) is 2-colorable if \(c:V\to\{0,1\}\) assigns different colors to the endpoints of every edge. Which statements about 2-colorable graphs are true?

  • (A) A 2-colorable graph may contain odd-length cycles
  • (B) A 2-colorable graph may contain even-length cycles
  • (C) An optimal adjacency-list test for 2-colorability runs in \(\Theta(|V|+|E|)\)
  • (D) An optimal adjacency-list test for 2-colorability runs in \(\Theta(|E|\log|V|)\)

Question 56:

An ISP with address block 202.16.0.0/15 assigns a block of 6000 IP addresses to a client using CIDR supernetting. Which address blocks can it assign?

  • (A) 202.16.0.0/19
  • (B) 202.17.64.0/19
  • (C) 202.16.32.0/19
  • (D) 202.17.24.0/19

Question 57:

Let \(G\) be an undirected graph that is a path on 8 vertices. The number of matchings in \(G\) is . (answer in integer)


Question 58:

A random variable \(X\) takes values in \(\{1,2,3,4,5,6,7,8\}\). \(\Pr(X=1)=\Pr(X=2)=\Pr(X=5)=\Pr(X=7)=1/6\), and \(\Pr(X=3)=\Pr(X=4)=\Pr(X=6)=\Pr(X=8)=1/12\). Find \(E[X]\), rounded to two decimal places.


Question 59:

A hard disk rotates at 15000 rpm. Moving the read/write head between adjacent tracks takes 1 ms. Initially the head is on track 0. There are 400 sectors per track, each of size 1024 bytes. Data must be transferred from 10 randomly located sectors in each of tracks 5, 12, and 7, in that order. Find the total transfer time in milliseconds, rounded to one decimal place.


Question 60:

The EX stage of a pipelined processor performs memory reads for LOAD and arithmetic/logic operations. Let \(t_{EX}\) be its operation time. In a 100-instruction program P, the values are:

Instruction\(t_{EX}\) (ns)\(M\)
LOAD1.815
IMUL1.510
IDIV2.55
FADD1.710
FSUB1.75
FMUL2.815
FDIV3.25
All other instructionsLess than 1.035
The pipeline clock cycle is 1 ns and interstage latch time is negligible. How many clock cycles is the pipeline stalled due to structural hazards in EX? (answer in integer)


Question 61:

Consider the recursive functions:

int bar(int n) {
if (n == 1) return 0;
else return 1 + bar(n/2);
}
int foo(int n) {
if (n == 1) return 1;
else return 1 + foo(bar(n));
}
What is the smallest positive integer \(n\) for which foo(n) returns 5? Ignore any syntax errors. (answer in integer)


Question 62:

The preorder traversal of a binary search tree \(T\) is \(50,25,13,40,30,47,75,60,70,80,77\). What is the position of element 60 in the postorder traversal, counting positions from 1? (answer in integer)


Question 63:

Assume the following program compiles and runs successfully and every fork() succeeds:

int main() {
int i;
for (i = 0; i < 3; i++) {
if (fork() == 0) {
continue;
}
break;
}
printf("Hello!");
return 0;
}
How many times is the printf statement executed? (answer in integer)


Question 64:

A CPU executes Actuator processes (A), each with a 6-second CPU burst, and Controller processes (C), each with an 8-second burst. A processes arrive at \(t=10,20,30,40,50\) seconds; C processes arrive at \(t=11,22,33,44,55\) seconds. Scheduling is FCFS, and the first A starts at \(t=10\). Find the average waiting time for the ten processes, rounded to one decimal place.


Question 65:

A relation \(R(A,B,C,D)\) has exactly two candidate keys, \(\{A,B\}\) and \(\{A,C\}\). How many superkeys does \(R\) have? (answer in integer)

GATE 2026 CS-1 Exam Pattern and Marking Scheme Explained

The official IIT Guwahati master-paper and answer-key page states that its key follows the master-paper order; candidate-console ordering could differ.

  • Total: 65 questions, 100 marks, and a three-hour CBT in English.
  • CS-1 master-key mix: 28 MCQs, 24 MSQs, and 13 NAT questions.
  • Marks: General Aptitude carries 15 marks, Engineering Mathematics 13, and the CS core 72.
  • Negative marking: a wrong one-mark MCQ loses 1/3 and a wrong two-mark MCQ loses 2/3. MSQ and NAT have no negative marking; MSQ has no partial credit.
  • Calculator: an on-screen virtual scientific calculator is provided; physical calculators are not allowed.

High-Weightage Areas in the GATE 2026 CS-1 Master Paper

Our 65-row question-to-taxonomy mapping shows a broad paper, with graph, systems, and reasoning work spread across the core.

  • General Aptitude: 10 questions.
  • Engineering Mathematics: 8 questions, including probability, calculus, and discrete reasoning.
  • Computer Organization and Architecture: 7 questions.
  • Programming and Data Structures: 8 questions when the two existing QACMS naming variants are combined.
  • Algorithms: 6 questions; Networks and Operating Systems contribute 5 each.

GATE 2026 CS-1 Engineering Mathematics Solution Video

Source: Shrenik Jain

How to Use the GATE 2026 CS-1 Question Paper for Practice

Attempt the master paper in one uninterrupted 180-minute sitting, then use the separate solution booklet and the individual links above to diagnose each error.

  • Record MCQ, MSQ, and NAT accuracy separately; guessing is penalised only in MCQs.
  • Redo the long graph, compiler, and systems questions without reading the final answer first.
  • Compare the exact master-paper number with the official key, not the shuffled console position.

GATE 2026 CS-1 Question Paper with Solutions FAQs

Ques. Was GATE 2026 CS-1 a lengthy paper?

Ans. Candidates commonly described the forenoon paper as concept-heavy and lengthy, especially in mathematics and the CS core. Its official master key contains 24 MSQs, so selecting all correct choices without partial credit matters.

Ques. How many questions and marks were in GATE 2026 CS-1?

Ans. There were 65 questions for 100 marks in three hours: 28 MCQs, 24 MSQs, and 13 NAT questions in the published CS-1 master key.

Ques. What was the GATE 2026 CS qualifying mark?

Ans. IIT Guwahati lists the CS qualifying cut-off as 30 for General, 27 for OBC-NCL/EWS, and 20 for SC/ST/PwD. This is a qualifying threshold, not an admission guarantee.

Ques. Can I use a physical calculator in GATE CS?

Ans. No. GATE provides a virtual scientific calculator on the computer screen; candidates cannot bring a physical calculator.

Ques. Where can I download the official GATE 2026 CS-1 paper and key?

Ans. Use the question and solution downloads above for this study booklet. The official master paper and answer key are on the GATE 2026 IIT Guwahati website.