Consider the following Boolean expression of a function F: F(P,Q) = (not P + Q) (+) (not P * Q). Which of the following expressions is/are equivalent to F?
GATE→2026→CS Core→Digital Logic
Q2
MSQ[1 Mark]
Consider the 8-bit signed integers X, Y and Z represented using the sign-magnitude form. X: 10110100, Y: 01001100. Which of the following operations result(s) in an arithmetic overflow?
GATE→2026→CS Core→Digital Logic
Q3
MCQ[2 Marks]
Consider a 2-bit saturating up/down counter... Which one of the following options corresponds to the expressions for the inputs of the D flip-flops, D1 and D0?
GATE→2026→CS Core→Digital Logic
Q4
MSQ[2 Marks]
Consider Boolean function F(P,Q,R,S) = sum m(1,2,3,4,5,7,10,12,13,14). Which of the following are minimal sum-of-products expressions?
GATE→2025→CS Core→Digital Logic
Q5
MSQ[1 Mark]
Let X be 3-variable majority function. Which statements are CORRECT?
GATE→2025→CS Core→Digital Logic
Q6
MSQ[1 Mark]
-6 in 4-bit 2's comp is 1010. Correct 2's complement representations?
GATE→2025→CS Core→Digital Logic
Q7
MCQ[2 Marks]
Boolean function F(b3, b2, b1, b0) = sum m(0, 2, 4, 8, 10, 11, 12). Minimized SOP expression?
GATE→2025→CS Core→Digital Logic
Q8
NAT[2 Marks]
Minimum number of states required to realize FSM given by state transition table.
GATE→2025→CS Core→Digital Logic
Q9
NAT[2 Marks]
Sequential circuit with D flip-flops. Number of distinct states before returning to initial state.
GATE→2024→CS Core→Digital Logic
Q10
MCQ[1 Mark]
Consider a system that uses 5 bits for representing signed integers in 2's complement format. A = 01010 and B = 11010. Which operation results in an arithmetic overflow or underflow?
GATE→2024→CS Core→Digital Logic
Q11
MSQ[1 Mark]
Consider the circuit shown below where the gates may have propagation delays. Which of the following statements about the circuit is/are CORRECT?
GATE→2024→CS Core→Digital Logic
Q12
MSQ[2 Marks]
Consider F(X,Y,Z) = sum m(3,5,6,7). Which of the following is/are CORRECT?
GATE→2024→CS Core→Digital Logic
Q13
NAT[2 Marks]
Consider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and M3... For inputs X1=1, X2=1, X3=0, X4=0, the number of combinations of A, B, C that give output Y=1 is
GATE→2023→CS Core→Digital Logic
Q14
MCQ[1 Mark]
The output of a 2-input multiplexer is connected back to one of its inputs as shown in the figure. Match the functional equivalence of this circuit to one of the following options.
GATE→2023→CS Core→Digital Logic
Q15
NAT[1 Mark]
A particular number is written as 132 in radix-4 representation. The same number in radix-5 representation is
GATE→2023→CS Core→Digital Logic
Q16
MCQ[2 Marks]
Consider a sequential digital circuit consisting of T flip-flops and D flip-flops as shown in the figure... Which one of the given values of (Q1, Q2, Q3) can NEVER be obtained with this digital circuit?
GATE→2023→CS Core→Digital Logic
Q17
MCQ[2 Marks]
A Boolean digital circuit is composed using two 4-input multiplexers (M1 and M2) and one 2-input multiplexer (M3)... Which one of the following set of values of (X0, X1, X2, X3, X4, X5, X6, X7) will realise the Boolean function \overline{A} + \overline{A}\overline{C} + A\overline{B}C?
Computer Organization and Architecture
29 Questions
GATE→2026→CS Core→Computer Organization and Architecture
Q18
MCQ[1 Mark]
Match each addressing mode in List I with a data element or an element of a data structure in List II:
P. Immediate
Q. Indirect
R. Base with index
S. Base with offset/displacement
List II:
1. Element of an array
2. Pointer
3. Element of a record
4. Constant
GATE→2026→CS Core→Computer Organization and Architecture
Q19
MCQ[1 Mark]
Consider a processor P whose instruction set architecture is the load-store architecture... Which one of the following sequences of instructions corresponds to the high-level language statement Z = X + Y?
GATE→2026→CS Core→Computer Organization and Architecture
Q20
MCQ[1 Mark]
Which one of the following dependencies among the register operands of different instructions can cause a data hazard in a pipelined processor?
GATE→2026→CS Core→Computer Organization and Architecture
Q21
MCQ[2 Marks]
Consider IEEE 754 single-precision floating-point variables X (35C00000) and Y (34A00000). Let Z = X + Y. The hexadecimal representation of Z is
GATE→2026→CS Core→Computer Organization and Architecture
Q22
MCQ[2 Marks]
Physical address space size 2^32 bytes, cache capacity 2^23 bytes, block size 128 bytes. Tag length M for direct mapped and N for K-way set-associative (K = 2^L). Which option is true?
GATE→2025→CS Core→Computer Organization and Architecture
Q23
MCQ[1 Mark]
Suppose a program is running on a non-pipelined single processor computer system. Steps: (i) saves program counter, (ii) loads PC with ISR start address, (iii) finishes present instruction. Correct sequence?
GATE→2025→CS Core→Computer Organization and Architecture
Q24
MSQ[1 Mark]
Partial data path of processor. Which are CORRECT related to arithmetic operations?
GATE→2025→CS Core→Computer Organization and Architecture
Q25
MCQ[2 Marks]
Memory system 1MB main memory, 16KB cache, 20-bit address, 16-byte block size. Direct mapped cache. Bits required to store all tag values?
GATE→2025→CS Core→Computer Organization and Architecture
Q26
MCQ[2 Marks]
Processor has 64 general-purpose registers and 50 distinct instruction types. 32-bit instruction format. Maximum bits for immediate operand?
GATE→2025→CS Core→Computer Organization and Architecture
Q27
NAT[2 Marks]
Memory hierarchy L1 cache (hit rate 95%, access time 10ns), L2 cache (hit rate 85%, access time 20ns), Main memory (200ns). Average memory access time in ns?
GATE→2024→CS Core→Computer Organization and Architecture
Q28
MCQ[1 Mark]
Which one of the following statements is FALSE?
GATE→2024→CS Core→Computer Organization and Architecture
Q29
MSQ[1 Mark]
Consider a 5-stage pipelined processor. Which of the following statements about forwarding is/are CORRECT?
GATE→2024→CS Core→Computer Organization and Architecture
Q30
MSQ[2 Marks]
Consider two set-associative cache memory architectures: WBC (write back) and WTC (write through). Which of the following statements is/are TRUE?
GATE→2024→CS Core→Computer Organization and Architecture
Q31
NAT[2 Marks]
Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is
GATE→2024→CS Core→Computer Organization and Architecture
Q32
NAT[2 Marks]
The baseline execution time of a program on a 2 GHz single core machine is 100 ns. 90% parallelizable. Overhead 10 ns per core. Number of cores that minimize execution time?
GATE→2024→CS Core→Computer Organization and Architecture
Q33
NAT[2 Marks]
A given program has 25% load/store instructions. Ideal CPI = 2. 2% instruction miss rate, 8% data miss rate. Miss penalty = 100 cycles. Speedup (rounded off to two decimal places) achieved with a perfect cache is
GATE→2023→CS Core→Computer Organization and Architecture
Q34
NAT[1 Mark]
Consider a 3-stage pipelined processor having a delay of 10 ns, 20 ns, and 14 ns. Total execution time for executing 100 instructions on this processor is ___ ns.
GATE→2023→CS Core→Computer Organization and Architecture
Q35
MCQ[2 Marks]
Consider the given C-code and its corresponding assembly code, with a few operands U1-U4 being unknown... Which one of the following options is a CORRECT replacement for operands in the position (U1, U2, U3, U4)?
GATE→2023→CS Core→Computer Organization and Architecture
Q36
MCQ[2 Marks]
A 4 kilobyte (KB) byte-addressable memory is realized using four 1 KB memory blocks... The input memory addresses (IA11-IA0), in decimal, for the starting locations (Addr=0) of each block (indicated as X1, X2, X3, X4) are among the options given below. Which one is CORRECT?
GATE→2023→CS Core→Computer Organization and Architecture
Q37
MCQ[2 Marks]
Consider the IEEE-754 single precision floating point numbers P = 0xC1800000 and Q = 0x3F5C2EF4. Which one of the following corresponds to the product of these numbers?
GATE→2023→CS Core→Computer Organization and Architecture
Q38
NAT[2 Marks]
An 8-way set associative cache of size 64 KB is used in a system with 32-bit address... The number of bits in the TAG is
GATE→2022→CS Core→Computer Organization and Architecture
Q39
MCQ[1 Mark]
Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
GATE→2022→CS Core→Computer Organization and Architecture
Q40
MCQ[1 Mark]
Let R1 and R2 be two 4-bit registers that store numbers in 2's complement form. For the operation R1+R2, which one of the following values of R1 and R2 gives an arithmetic overflow?
GATE→2022→CS Core→Computer Organization and Architecture
Q41
MSQ[1 Mark]
WB is a write back cache and WT is a write through cache. Which of the following statements is/are FALSE?
GATE→2022→CS Core→Computer Organization and Architecture
Q42
NAT[1 Mark]
The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is
GATE→2022→CS Core→Computer Organization and Architecture
Q43
MCQ[2 Marks]
Which one of the following represents the functionality of P, Q, and T?
GATE→2022→CS Core→Computer Organization and Architecture
Q44
MCQ[2 Marks]
Which one of the following is FALSE?
GATE→2022→CS Core→Computer Organization and Architecture
Q45
MSQ[2 Marks]
Consider a system with 2 KB direct mapped data cache... Which of the following statements is/are TRUE with respect to the data cache?
GATE→2022→CS Core→Computer Organization and Architecture
Q46
NAT[2 Marks]
The speed up (rounded off to two decimal places) obtained by X2 over X1 in executing P is
Programming and Data Structures
30 Questions
GATE→2026→CS Core→Programming and Data Structures
Q47
MSQ[1 Mark]
Consider a hash table P[0, 1, ..., 10] initially empty, using linear probing with h(x) = (x + 7) mod 11. Insertions: 1, 13, 22, 15, 11, 24. Which of the following positions is/are empty after these insertions?
GATE→2026→CS Core→Programming and Data Structures
Q48
NAT[1 Mark]
The height of a binary tree is the number of edges in the longest path from root to leaf. The maximum possible height of a full binary tree with 23 nodes is
GATE→2026→CS Core→Programming and Data Structures
Q49
NAT[1 Mark]
Consider the following program in C... The output of the program is
GATE→2026→CS Core→Programming and Data Structures
Q50
MCQ[2 Marks]
Consider C code computing node count in a linked list... Which option gives correct replacements for E1 and E2?
GATE→2026→CS Core→Programming and Data Structures
Q51
MCQ[2 Marks]
Let P be integers 1 to 15. Insertion into BST creating a complete binary tree. Which element can NEVER be the third element inserted?
GATE→2025→CS Core→Programming and Data Structures
Q52
MSQ[1 Mark]
Which statements are TRUE for any BST with n distinct integers?
GATE→2025→CS Core→Programming and Data Structures
Q53
NAT[1 Mark]
Array of 30 distinct integers in descending order. Number of swaps performed by bubble sort function fun().
GATE→2025→CS Core→Programming and Data Structures
Q54
NAT[1 Mark]
Output of C program with foo(int *p, int x) { *p = x; } and main.
GATE→2025→CS Core→Programming and Data Structures
Q55
NAT[2 Marks]
Value printed by given C program with foo on array A = {0, 1, 2, 2, 2, 0, 0, 1, 1}.
GATE→2025→CS Core→Programming and Data Structures
Q56
NAT[2 Marks]
Linked lists L1 (9 nodes) and L2 (7 nodes). C program modifies L1. Number of nodes in L1 after execution?
GATE→2025→CS Core→Programming and Data Structures
Q57
NAT[2 Marks]
Value printed by given C program gate(14362).
GATE→2025→CS Core→Programming and Data Structures
Q58
NAT[2 Marks]
Double hashing scheme, h1(k) = k mod 11, h2(k) = 1 + (k mod 7), m = 11. Keys inserted in order: 63, 50, 25, 79, 67, 24. Slot at which key 24 gets stored?
GATE→2024→CS Core→Programming and Data Structures
Q59
MCQ[1 Mark]
Consider the following C program... Output of printf('%d', a)?
GATE→2024→CS Core→Programming and Data Structures
Q60
MCQ[1 Mark]
Consider the following recursive C program with getchar() and putchar(). Input: 1234 followed by newline.
GATE→2024→CS Core→Programming and Data Structures
Q61
NAT[1 Mark]
Evaluate expression 3 + 1 + 5 * 2 / 7 + 2 - 4 - 7 - 6 / 2 as per given operator precedence and associativity rules.
GATE→2024→CS Core→Programming and Data Structures
Q62
MCQ[2 Marks]
An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?
GATE→2024→CS Core→Programming and Data Structures
Q63
MCQ[2 Marks]
Consider a binary min-heap containing 10^5 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number of ancestors of max element...
GATE→2024→CS Core→Programming and Data Structures
Q64
MSQ[2 Marks]
Consider the following C function definition. Which of the following statements is/are TRUE about the above function?
GATE→2023→CS Core→Programming and Data Structures
Q65
MCQ[1 Mark]
Which one of the following sequences when stored in an array at locations A[1],...,A[10] forms a max-heap?
GATE→2023→CS Core→Programming and Data Structures
Q66
MCQ[1 Mark]
Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel be another function that deletes a node in a doubly-linked list. Worst-case time complexity?
GATE→2023→CS Core→Programming and Data Structures
Q67
NAT[1 Mark]
The integer value printed by the ANSI-C program given below is
GATE→2023→CS Core→Programming and Data Structures
Q68
MCQ[2 Marks]
Let A be a priority queue implemented using a max-heap data structure... When A contains n elements, which one of the following statements about worst case running time of these two operations is TRUE?
GATE→2023→CS Core→Programming and Data Structures
Q69
MCQ[2 Marks]
Consider the C function foo and the binary tree shown... When foo is called with a pointer to the root node of the given binary tree, what will it print?
GATE→2023→CS Core→Programming and Data Structures
Q70
NAT[2 Marks]
Consider a sequence a of elements a0=1, a1=5, a2=7, a3=8, a4=9 and a5=2... The top element of S after executing the above operations is
GATE→2022→CS Core→Programming and Data Structures
Q71
MCQ[1 Mark]
Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in O(1) space?
GATE→2022→CS Core→Programming and Data Structures
Q72
MCQ[1 Mark]
What is printed by the following ANSI C program?
GATE→2022→CS Core→Programming and Data Structures
Q73
NAT[1 Mark]
Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using array representation starting with 0. The 3rd largest element is stored at index
GATE→2022→CS Core→Programming and Data Structures
Q74
MCQ[2 Marks]
What is printed by the following ANSI C program?
GATE→2022→CS Core→Programming and Data Structures
Q75
MCQ[2 Marks]
What is printed by the following ANSI C program?
GATE→2022→CS Core→Programming and Data Structures
Q76
NAT[2 Marks]
The minimum number of Enqueue operations on Q1 required to place the elements of Q1 in Q2 in reverse order without using any additional storage is
Algorithms
30 Questions
GATE→2026→CS Core→Algorithms
Q77
MCQ[1 Mark]
Consider the following recurrence relations: T1(n) = 4 T1(n/2) + T2(n), T2(n) = 5 T2(n/4) + Theta(log2 n)... Which one of the following options is correct?
GATE→2026→CS Core→Algorithms
Q78
MSQ[1 Mark]
Let n be an odd number greater than 100. Consider a binary minheap with n elements stored in an array P whose index starts from 1. Which of the following indices of P do/does NOT correspond to any leaf node of the minheap?
GATE→2026→CS Core→Algorithms
Q79
MCQ[2 Marks]
Let G(V,E) be an undirected edge-weighted graph... Consider statements S1 and S2 regarding shortest paths. Which option is correct?
GATE→2026→CS Core→Algorithms
Q80
MSQ[2 Marks]
Let G(V,E) be a simple undirected graph, smallest vertex cover size k. For vertex v in V, which constraints ensure v in S?
GATE→2026→CS Core→Algorithms
Q81
MSQ[2 Marks]
Let G(V,E) be a simple undirected graph with unique edge weights. Which statements about Minimum Spanning Trees (MST) are true?
GATE→2026→CS Core→Algorithms
Q82
MSQ[2 Marks]
Consider DFS pseudocode on a DAG G(V,E). For an edge (u,v) in E, which option will NEVER be correct?
GATE→2026→CS Core→Algorithms
Q83
MSQ[2 Marks]
An undirected unweighted graph G(V,E) is 2-colorable if there exists c: V -> {0,1} with c(u) != c(v) for all (u,v) in E. Which statements about 2-colorable graphs are true?
GATE→2025→CS Core→Algorithms
Q84
MCQ[1 Mark]
Let G be undirected graph with positive weights, T be MST. d1(u,v) and d2(u,v) are shortest distances in G and T respectively. Which is CORRECT?
GATE→2025→CS Core→Algorithms
Q85
MCQ[1 Mark]
Recurrence relation: T(n) = 2 T(n-1) + n 2^n for n > 0, T(0) = 1. Solution?
GATE→2025→CS Core→Algorithms
Q86
NAT[1 Mark]
Min-Heap stores 32 keys. Height of T (max edges from root to leaf)?
GATE→2025→CS Core→Algorithms
Q87
MCQ[2 Marks]
Undirected unweighted graph with 100 vertices, max shortest path distance (diameter) be 30. T is any BFS tree. Height of T?
GATE→2025→CS Core→Algorithms
Q88
NAT[2 Marks]
Maximum value of x such that edge between nodes B and C is included in every minimum spanning tree of given graph.
GATE→2024→CS Core→Algorithms
Q89
MCQ[1 Mark]
Given array of N elements, check if sorted in single pass comparing adjacent elements. Worst-case time complexity?
GATE→2024→CS Core→Algorithms
Q90
MCQ[2 Marks]
Consider the following recurrence relation: T(n) = T(sqrt(n)) + n for n >= 1, T(1) = 1. Which one of the following options is CORRECT?
GATE→2024→CS Core→Algorithms
Q91
MSQ[2 Marks]
Let G be a directed graph and T a depth first search (DFS) spanning tree in G rooted at v. Suppose T is also a breadth first search (BFS) tree in G. Which of the following statements is/are TRUE?
GATE→2024→CS Core→Algorithms
Q92
NAT[2 Marks]
The number of edges present in the forest generated by the DFS traversal of an undirected graph G with 100 vertices is 40. The number of connected components in G is
GATE→2023→CS Core→Algorithms
Q93
MCQ[1 Mark]
An algorithm has to store several keys generated by an adversary in a hash table... Which one of the following is the best hashing strategy to counteract the adversary?
GATE→2023→CS Core→Algorithms
Q94
MSQ[1 Mark]
Let f and g be functions of natural numbers given by f(n) = n and g(n) = n^2. Which of the following statements is/are TRUE?
GATE→2023→CS Core→Algorithms
Q95
MSQ[2 Marks]
Consider functions Function_1 and Function_2 expressed in pseudocode... Which of the following statements is/are TRUE?
GATE→2023→CS Core→Algorithms
Q96
MSQ[2 Marks]
Consider simple undirected graph G. Color vertices using greedy strategy. Which of the following statements is/are TRUE?
GATE→2023→CS Core→Algorithms
Q97
NAT[2 Marks]
Let U = {1, 2, 3}. Consider undirected graph G whose vertex set is 2^U... Cardinality of B(\emptyset) is
GATE→2022→CS Core→Algorithms
Q98
MCQ[1 Mark]
Which one of the following statements is TRUE for all positive functions f(n)?
GATE→2022→CS Core→Algorithms
Q99
MCQ[1 Mark]
Suppose we are given n keys, m hash table slots, and two simple uniform hash functions h1 and h2. Further suppose our hashing scheme uses h1 for the odd keys and h2 for the even keys. What is the expected number of keys in a slot?
GATE→2022→CS Core→Algorithms
Q100
NAT[1 Mark]
Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is
GATE→2022→CS Core→Algorithms
Q101
MCQ[2 Marks]
Consider a simple undirected unweighted graph with at least three vertices. If A is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of
GATE→2022→CS Core→Algorithms
Q102
MSQ[2 Marks]
Consider a simple undirected weighted graph G, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of G is/are TRUE?
GATE→2022→CS Core→Algorithms
Q103
MSQ[2 Marks]
The following simple undirected graph is referred to as the Peterson graph. Which of the following statements is/are TRUE?
GATE→2022→CS Core→Algorithms
Q104
MSQ[2 Marks]
Consider the following recurrence... Which of the following statements is/are TRUE?
GATE→2022→CS Core→Algorithms
Q105
MSQ[2 Marks]
Which of the properties hold for the adjacency matrix A of a simple undirected unweighted graph having n vertices?
GATE→2022→CS Core→Algorithms
Q106
NAT[2 Marks]
The number of such directed spanning trees rooted at vertex 5 is
Theory of Computation
23 Questions
GATE→2026→CS Core→Theory of Computation
Q107
MSQ[1 Mark]
Consider grammar S -> aSbS | bS | epsilon. Which of the following statements is/are true?
GATE→2026→CS Core→Theory of Computation
Q108
MSQ[1 Mark]
Let M be an NFA with 6 states over a finite alphabet. Which of the following options CANNOT be the number of states in the minimal DFA equivalent to M?
GATE→2026→CS Core→Theory of Computation
Q109
MSQ[2 Marks]
Let L1 and L2 be languages such that L1 subset L2 and L2 is regular. Which of the following statements is/are always true?
GATE→2026→CS Core→Theory of Computation
Q110
MSQ[2 Marks]
Consider context-free grammar G. Let n1(s) be the number of a's and n2(s) be the number of b's in s in L(G). Which statements are true?
GATE→2025→CS Core→Theory of Computation
Q111
MCQ[1 Mark]
CFG G: S -> aaB | Abb, A -> a | aA, B -> b | bB. Language L(G)?
GATE→2025→CS Core→Theory of Computation
Q112
MSQ[1 Mark]
Regular language L accepted by NFA with n states. Which are FALSE?
GATE→2025→CS Core→Theory of Computation
Q113
MCQ[2 Marks]
Languages L1 and L2 over {a,b}. Which is CORRECT?
GATE→2025→CS Core→Theory of Computation
Q114
MCQ[2 Marks]
Languages L1 and L2 over {a,b,c}. Which is CORRECT?
GATE→2025→CS Core→Theory of Computation
Q115
MSQ[2 Marks]
DFA over {a,b}. Which language(s) accepted?
GATE→2024→CS Core→Theory of Computation
Q116
MSQ[1 Mark]
Let L1, L2 be two regular languages and L3 a language which is not regular. Which of the following statements is/are always TRUE?
GATE→2024→CS Core→Theory of Computation
Q117
MSQ[2 Marks]
Consider the 5-state DFA M accepting the language L(M) over {0,1}*. Which of the following statements is/are FALSE?
GATE→2024→CS Core→Theory of Computation
Q118
NAT[2 Marks]
Let G be a CFG in Chomsky Normal Form with 3 terminals and 10 variables. String w = a^30 b^30 c^30 is derivable from S. Number of steps in derivation S ->* w is
GATE→2024→CS Core→Theory of Computation
Q119
NAT[2 Marks]
Consider two regular expressions over {0,1}: r = 0* + 1*, s = 01* + 10*. Total number of strings of length <= 5, which are neither in r nor in s, is
GATE→2023→CS Core→Theory of Computation
Q120
MCQ[1 Mark]
Consider the Deterministic Finite-state Automaton (DFA) A shown below... Which one of the following regular expressions correctly describes the language accepted by A?
GATE→2023→CS Core→Theory of Computation
Q121
MSQ[1 Mark]
Which of the following statements is/are CORRECT?
GATE→2023→CS Core→Theory of Computation
Q122
MCQ[2 Marks]
Consider the context-free grammar G below... Which one of the following statements is CORRECT?
GATE→2023→CS Core→Theory of Computation
Q123
MCQ[2 Marks]
Consider the pushdown automaton (PDA) P below... Which one of the following options correctly describes the language accepted by P?
GATE→2023→CS Core→Theory of Computation
Q124
NAT[2 Marks]
Consider the language L over the alphabet {0,1}... The minimum number of states in a Deterministic Finite-State Automaton (DFA) for L is
GATE→2022→CS Core→Theory of Computation
Q125
MCQ[1 Mark]
Which one of the following regular expressions correctly represents the language of the finite automaton given below?
GATE→2022→CS Core→Theory of Computation
Q126
MSQ[1 Mark]
Which of the following statements is/are TRUE?
GATE→2022→CS Core→Theory of Computation
Q127
MSQ[2 Marks]
Which of the following is/are undecidable?
GATE→2022→CS Core→Theory of Computation
Q128
MSQ[2 Marks]
Consider the following languages... Which of the following is/are TRUE?
GATE→2022→CS Core→Theory of Computation
Q129
MSQ[2 Marks]
Consider the following languages... Which of the following statements is/are FALSE?
Compiler Design
20 Questions
GATE→2026→CS Core→Compiler Design
Q130
MSQ[1 Mark]
Consider the following C statements:
/* S1 */ char *str1 = "Hello;
/* S2 */ char *str2 = "Hello;";
/* S3 */ int *str3 = "Hello";
Which options is/are correct?
GATE→2026→CS Core→Compiler Design
Q131
MSQ[1 Mark]
Which of the following statements is/are true?
GATE→2026→CS Core→Compiler Design
Q132
MCQ[2 Marks]
Consider the control flow graph shown in the figure. Which option correctly lists redundant expressions in basic blocks B4 and B5?
GATE→2026→CS Core→Compiler Design
Q133
MSQ[2 Marks]
Consider syntax-directed definitions SDD1 and SDD2. Which of the following statements is/are true?
GATE→2025→CS Core→Compiler Design
Q134
MCQ[1 Mark]
Which ONE of the following statements is FALSE regarding the symbol table?
GATE→2025→CS Core→Compiler Design
Q135
MCQ[1 Mark]
Which ONE of the following techniques used in compiler code optimization uses live variable analysis?
GATE→2025→CS Core→Compiler Design
Q136
MSQ[2 Marks]
Which statements are TRUE while computing First and Follow during top-down parsing?
GATE→2025→CS Core→Compiler Design
Q137
NAT[2 Marks]
Number of basic blocks in given 3-address code sequence.
GATE→2024→CS Core→Compiler Design
Q138
MSQ[1 Mark]
Which of the following is/are Bottom-Up Parser(s)?
GATE→2024→CS Core→Compiler Design
Q139
MCQ[2 Marks]
Consider the following syntax-directed definition (SDD)... Given 'MMLK' as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val)?
GATE→2024→CS Core→Compiler Design
Q140
MCQ[2 Marks]
Consider the following grammar G, with S as the start symbol. The grammar G has three incomplete productions denoted by (1), (2), and (3)... Which one of the following options CORRECTLY fills in the incomplete productions?
GATE→2024→CS Core→Compiler Design
Q141
MCQ[2 Marks]
Consider the following pseudo-code. Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively?
GATE→2023→CS Core→Compiler Design
Q142
MCQ[1 Mark]
Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the target hardware. S2: The back-end includes phases that are specific to the target hardware. S3: The back-end includes phases that are specific to the programming language used in the source code. Identify the CORRECT option.
GATE→2023→CS Core→Compiler Design
Q143
MCQ[1 Mark]
Consider the following definition of a lexical token id for an identifier in a programming language... Which one of the following Non-deterministic Finite-state Automata with \epsilon-transitions accepts the set of valid identifiers?
GATE→2023→CS Core→Compiler Design
Q144
MCQ[2 Marks]
Consider the following program... Which one of the following options represents the activation tree corresponding to the main function?
GATE→2023→CS Core→Compiler Design
Q145
MCQ[2 Marks]
Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?
GATE→2023→CS Core→Compiler Design
Q146
NAT[2 Marks]
Consider the syntax directed translation given by the following grammar and semantic rules... The value computed by the translation scheme for the input string 10#011 is
GATE→2022→CS Core→Compiler Design
Q147
MCQ[1 Mark]
Which one of the following statements is TRUE?
GATE→2022→CS Core→Compiler Design
Q148
NAT[1 Mark]
If I_0 is the set of two LR(0) items {[S' -> S.], [S -> S. + R]}, then goto(closure(I_0), +) contains exactly ___ items.
GATE→2022→CS Core→Compiler Design
Q149
NAT[2 Marks]
Using this translation scheme, the computed value of S.val for root of the parse tree for the expression 20#10%5#8%2%2 is
Operating System
26 Questions
GATE→2026→CS Core→Operating System
Q150
MSQ[1 Mark]
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
GATE→2026→CS Core→Operating System
Q151
NAT[1 Mark]
Consider a system consisting of k instances of a resource R, shared by 5 processes... The minimum value of k for the system to be deadlock-free is
GATE→2026→CS Core→Operating System
Q152
MSQ[2 Marks]
Consider a system with cache and MMU with TLB. Evicted pages invalidate corresponding cache blocks. Which sequence of events can NEVER happen?
GATE→2025→CS Core→Operating System
Q153
MCQ[1 Mark]
Consider a demand paging memory management system with 32-bit logical address, 20-bit physical address, and page size of 2048 bytes. Maximum number of entries in page table?
GATE→2025→CS Core→Operating System
Q154
NAT[1 Mark]
Number of times process enters ready queue during lifetime (excluding initial entry) for given program segment.
GATE→2025→CS Core→Operating System
Q155
MCQ[2 Marks]
Two processors M1 and M2, 4 processes P1, P2, P3, P4 bursts 20, 16, 25, 10. Non-preemptive priority scheduling... Average waiting time?
GATE→2025→CS Core→Operating System
Q156
NAT[2 Marks]
Disk 512MB, block size 64KB. Linked allocation, 4 bytes pointer per block. File size 1MB. Internal fragmentation in bytes?
GATE→2025→CS Core→Operating System
Q157
NAT[2 Marks]
Modified optimal page replacement predicting up to next 4 references. Reference string: 1, 3, 2, 4, 2, 3, 1, 2, 4, 3, 1, 4. 3 frames initially empty. Number of page faults?
GATE→2024→CS Core→Operating System
Q158
MSQ[1 Mark]
Which of the following statements about threads is/are TRUE?
GATE→2024→CS Core→Operating System
Q159
MSQ[1 Mark]
Which of the following process state transitions is/are NOT possible?
GATE→2024→CS Core→Operating System
Q160
MCQ[2 Marks]
Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a=b=1... Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?
GATE→2024→CS Core→Operating System
Q161
NAT[2 Marks]
Consider the following code snippet using fork() and wait(). Total number of times the printf statement is executed is
GATE→2024→CS Core→Operating System
Q162
NAT[2 Marks]
Consider a memory management system... Physical address corresponding to virtual address 2500 is
GATE→2023→CS Core→Operating System
Q163
MSQ[1 Mark]
Which one or more of the following need to be saved on a context switch from one thread (T1) of a process to another thread (T2) of the same process?
GATE→2023→CS Core→Operating System
Q164
MSQ[1 Mark]
Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
GATE→2023→CS Core→Operating System
Q165
MSQ[1 Mark]
Which one or more of the following CPU scheduling algorithms can potentially cause starvation?
GATE→2023→CS Core→Operating System
Q166
NAT[1 Mark]
The ratio T1/T2 is ___ (Rounded off to one decimal place)
GATE→2023→CS Core→Operating System
Q167
MCQ[2 Marks]
Consider the two functions incr and decr shown below... 5 threads incr, 3 threads decr. Minimum possible values of V1, V2 respectively?
GATE→2023→CS Core→Operating System
Q168
NAT[2 Marks]
Consider two-dimensional array D[128][128]... Number of page faults generated during execution of this code snippet is
GATE→2023→CS Core→Operating System
Q169
NAT[2 Marks]
Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with L levels... The value of L is
GATE→2022→CS Core→Operating System
Q170
MCQ[1 Mark]
Which initialization of the semaphores would print the sequence BCABCABCA....?
GATE→2022→CS Core→Operating System
Q171
MSQ[1 Mark]
Which of the following statements is/are TRUE with respect to deadlocks?
GATE→2022→CS Core→Operating System
Q172
MCQ[2 Marks]
Which one of the following statements is FALSE?
GATE→2022→CS Core→Operating System
Q173
MCQ[2 Marks]
Which one of the following is NOT possible as CPU burst time (in time units) of these processes?
GATE→2022→CS Core→Operating System
Q174
NAT[2 Marks]
Let the number of disk accesses required to insert a block in the middle of the file in A and B be nA and nB, respectively, then the value of nA + nB is
GATE→2022→CS Core→Operating System
Q175
NAT[2 Marks]
the page fault rate, defined as the ratio of number of page faults to the number of memory accesses (rounded off to one decimal place) is
Databases
21 Questions
GATE→2026→CS Core→Databases
Q176
MSQ[1 Mark]
Let P, Q, R and S be attributes. Which of the following functional dependency options is/are always true?
GATE→2026→CS Core→Databases
Q177
MSQ[1 Mark]
In the context of relational database normalization, which of the following statements is/are true?
GATE→2026→CS Core→Databases
Q178
MCQ[2 Marks]
Consider relations R(P,Q) and S(X,Y). Let tuple relational calculus expression E = {(u) | exists v ((u,v) in R and (v,u) in S)}. Which relational algebraic expression is equivalent to E?
GATE→2025→CS Core→Databases
Q179
MCQ[1 Mark]
Schedule: R1(X) W1(Y) R2(X) R2(Y) R3(Y) ABORT(T1). T1 aborts. Which other transactions rolled back?
GATE→2025→CS Core→Databases
Q180
MSQ[1 Mark]
Inserting 23 into B+ tree with max 3 keys per node. Which are CORRECT?
GATE→2025→CS Core→Databases
Q181
MCQ[2 Marks]
Tuple relational calculus query for players playing for team 'MI'.
GATE→2025→CS Core→Databases
Q182
MSQ[2 Marks]
Relational schema team(name, city, owner) with FDs {name->city, name->owner} decomposed into t1(name, city) and t2(name, owner). Which are TRUE?
GATE→2025→CS Core→Databases
Q183
NAT[2 Marks]
Value returned by given SQL query on sports league tables.
GATE→2024→CS Core→Databases
Q184
MCQ[1 Mark]
Let S be the specification: 'Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students.' Which ER diagram correctly represents S?
GATE→2024→CS Core→Databases
Q185
MCQ[1 Mark]
In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
GATE→2024→CS Core→Databases
Q186
NAT[1 Mark]
Consider relations R(A,B) and S(A,C). Total number of tuples obtained by evaluating sigma_{B<C}(R join_{R.A=S.A} S) is
GATE→2024→CS Core→Databases
Q187
MSQ[2 Marks]
Which of the following options is/are TRUE?
GATE→2024→CS Core→Databases
Q188
MSQ[2 Marks]
Consider the following read-write schedule S over three transactions T1, T2, and T3... Which of the following transaction schedules is/are conflict equivalent to S?
GATE→2023→CS Core→Databases
Q189
MCQ[1 Mark]
Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
GATE→2023→CS Core→Databases
Q190
NAT[2 Marks]
Consider the following table named Student in a relational database... The SQL query below is executed... The number of rows returned by the query is
GATE→2023→CS Core→Databases
Q191
NAT[2 Marks]
Consider a database of fixed-length records... Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is
GATE→2022→CS Core→Databases
Q192
MCQ[1 Mark]
In a relational data model, which one of the following statements is TRUE?
GATE→2022→CS Core→Databases
Q193
MSQ[1 Mark]
Which of the following relational algebra expressions return the set of eIds who own all the brands?
GATE→2022→CS Core→Databases
Q194
NAT[1 Mark]
Consider a relation R(A,B,C,D,E) with the following three functional dependencies: AB->C, BC->D, C->E. The number of superkeys in the relation R is
GATE→2022→CS Core→Databases
Q195
MCQ[2 Marks]
Which one of the following serial schedules is conflict equivalent to S?
GATE→2022→CS Core→Databases
Q196
NAT[2 Marks]
The number of rows returned by the above SQL query is
Computer Networks
27 Questions
GATE→2026→CS Core→Computer Networks
Q197
MCQ[1 Mark]
With respect to a TCP connection between a client and a server, which one of the following statements is true?
GATE→2026→CS Core→Computer Networks
Q198
MSQ[1 Mark]
Which of the following statements is/are true with respect to the interaction of a web browser with a web server using HTTP 1.1?
GATE→2026→CS Core→Computer Networks
Q199
MCQ[2 Marks]
A TCP sender establishes connection... slow-start threshold 10000 segments, RTT 1 ms. Time t (ms) at which transmission of segment 2000 starts is
GATE→2026→CS Core→Computer Networks
Q200
MCQ[2 Marks]
Sliding window protocol over lossless link, window size W frames, frame size 1000 bits, bandwidth 100 kbps, propagation delay 100 ms. Minimum W for 100% link utilization is
GATE→2026→CS Core→Computer Networks
Q201
MSQ[2 Marks]
An ISP having address block 202.16.0.0/15 assigns a block of 6000 IP addresses to a client using CIDR. Which address blocks can be assigned?
GATE→2025→CS Core→Computer Networks
Q202
MCQ[1 Mark]
Identify correct matching between OSI layers and functionalities.
GATE→2025→CS Core→Computer Networks
Q203
MSQ[1 Mark]
TCP 3-way handshake P1, P2, P3 flags. Which are TRUE?
GATE→2025→CS Core→Computer Networks
Q204
MCQ[2 Marks]
Destination IP 145.36.109.70 arrives at router with given routing table. Which interface?
GATE→2025→CS Core→Computer Networks
Q205
NAT[2 Marks]
5-bit message transmitted, bit flip probability 0.01 independently. Probability message delivered error-free?
GATE→2025→CS Core→Computer Networks
Q206
NAT[2 Marks]
Message size 15000 bytes transmitted via IPv4 through two routers with MTU 5000 and 3000 bytes. Number of fragments delivered to destination?
GATE→2024→CS Core→Computer Networks
Q207
MCQ[1 Mark]
User browsing webpage. Packets: (i) HTTP GET index, (ii) DNS request, (iii) HTTP GET image, (iv) TCP SYN. Correct chronological order?
GATE→2024→CS Core→Computer Networks
Q208
MSQ[1 Mark]
TCP client P successfully establishes a connection to TCP server Q. Let N_P denote the sequence number in SYN, N_Q denote acknowledgement number in SYN ACK. Which of the following statements is/are CORRECT?
GATE→2024→CS Core→Computer Networks
Q209
MSQ[1 Mark]
Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?
GATE→2024→CS Core→Computer Networks
Q210
MCQ[2 Marks]
Consider a network path P-Q-R between nodes P and R via router Q. Node P sends a file of size 10^6 bytes... Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which R receives all the chunks of the file?
GATE→2024→CS Core→Computer Networks
Q211
NAT[2 Marks]
Consider the entries shown below in the forwarding table of an IP router... Number of packets forwarded via the next hop router R2 is
GATE→2024→CS Core→Computer Networks
Q212
NAT[2 Marks]
Consider sending an IP datagram of size 1420 bytes... Number of fragments that would be delivered at the receiver is
GATE→2023→CS Core→Computer Networks
Q213
MCQ[1 Mark]
Suppose two hosts are connected by a point-to-point link and they are configured to use Stop-and-Wait protocol for reliable data transfer. Identify in which one of the following scenarios, the utilization of the link is the lowest.
GATE→2023→CS Core→Computer Networks
Q214
MSQ[1 Mark]
Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?
GATE→2023→CS Core→Computer Networks
Q215
MSQ[2 Marks]
Suppose you are asked to design a new reliable byte-stream transport protocol like TCP... Which of the following is/are valid lengths of the Sequence Number field in the myTCP header?
GATE→2023→CS Core→Computer Networks
Q216
MSQ[2 Marks]
Suppose in a web browser, you click on www.gate-2023.in URL... Which of the following statements is/are CORRECT about the minimum elapsed time between clicking on the URL and your browser fully rendering it?
GATE→2023→CS Core→Computer Networks
Q217
NAT[2 Marks]
The forwarding table of a router is shown below... A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID
GATE→2022→CS Core→Computer Networks
Q218
MCQ[1 Mark]
What is the number of subnets inside the enterprise network?
GATE→2022→CS Core→Computer Networks
Q219
NAT[1 Mark]
Consider the resolution of the domain name www.gate.org.in by a DNS resolver... The number of DNS query-response pairs involved in completely resolving the domain name is
GATE→2022→CS Core→Computer Networks
Q220
MSQ[2 Marks]
Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?
GATE→2022→CS Core→Computer Networks
Q221
NAT[2 Marks]
The probability of a routing loop formation (rounded off to one decimal place) between P and Q, leading to count-to-infinity problem, is
GATE→2022→CS Core→Computer Networks
Q222
NAT[2 Marks]
The time taken (in milliseconds, rounded off to two decimal places) for the receiver to completely receive a packet of 1000 bytes transmitted by the sender is
GATE→2022→CS Core→Computer Networks
Q223
NAT[2 Marks]
The minimum number of bits required for the sequence number field of the TCP header, to prevent the sequence number space from wrapping around during the MSL is