Previous Year Questions
1 paper · 55 questions — organised by subject with solutions and explanations.
🎯 Practice smarter, not harder
Just sign in to unlock everything. Free for all students.
Let . Let denote the powerset of . Consider an undirected graph whose vertex set is . For any is an edge in if and only if (i) , and (ii) either or . For any vertex in , the set of all possible orderi
Let and be functions of natural numbers given by and . Which of the following statements is/are TRUE?
Consider functions Function 1 and Function 2 expressed in pseudocode as follows: Let and denote the number of times the statement is executed in Function 1 and Function 2, respectively. Which of the f
Consider the syntax directed translation given by the following grammar and semantic rules. Here are non-terminals. is the starting non-terminal, and are lexical tokens corresponding to input letters
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 th
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?
Suppose you are asked to design a new reliable byte-stream transport protocol like TCP. This protocol, named myTCP, runs over a 100 Mbps network with Round Trip Time of 150 milliseconds and the maximu
Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?
Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local host, so a DNS lookup is triggered (by the local DN
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 utiliza
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 _____.
Consider a 3-stage pipelined processor having a delay of 10 ns (nanoseconds), 20 ns, and 14 ns, for the first, second, and the third stages, respectively. Assume that there is no other delay and the p
Consider the given C-code and its corresponding assembly code, with a few operands U1-U4 being unknown. Some useful information as well as the semantics of each unique assembly instruction is annotate
An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX, and BLOCK OFFSET. The number of bits in the TAG is
A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer system polls the keyboard every 10 ms (milli seconds) to check for a keystroke and consumes 100 (micro seco
A 4 kilobyte (KB) byte-addressable memory is realized using four 1 KB memory blocks. Two input address lines (IA4 and IA3) are connected to the chip select (CS) port of these memory blocks through a d
Consider the following table named Student in a relational database. The primary key of this table is rollNum. The SQL query below is executed on this database. SELECT * FROM Student WHERE gender = 'F
Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 bytes. The data file is
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.
Consider a sequential digital circuit consisting of T flip-flops and D flip-flops as shown in the figure. CLKIN is the clock input to the circuit. At the beginning, Q1, Q2 and Q3 have values 0, 1 and
A particular number is written as 132 in radix-4 representation. The same number in radix-5 representation is _____.
A Boolean digital circuit is composed using two 4-input multiplexers (M1 and M2) and one 2-input multiplexer (M3) as shown in the figure. X0-X7 are the inputs of the multiplexers M1 and M2 and could b
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 (i.e., P x Q), represented in the IE
Let be an onto (or surjective) function, where and are nonempty sets. Define an equivalence relation on the set as where . Let be the set of all the equivalence classes under . Define a new mapping as
Let U = {1, 2,...,n}, where n is a large positive integer greater than 1000. Let k be a positive integer less than n. Let A, B be subsets of U with |A| = |B| = k and . We say that a permutation of U s
Let be a real-valued function. Which of the following statements is/are TRUE?
Let A be the adjacency matrix of the graph with vertices {1, 2, 3, 4, 5}. Let be the five eigenvalues of A. Note that these eigenvalues need not be distinct. The value of _____
Consider a random experiment where two fair coins are tossed. Let A be the event that denotes HEAD on both the throws, B be the event that denotes HEAD on the first throw, and C be the event that deno
Let be a simple, finite, undirected graph with vertex set . Let denote the maximum degree of and let denote the set of all possible colors. Color the vertices of using the following greedy strategy: f
Let and Let det(A) and det(B) denote the determinants of the matrices A and B, respectively. Which one of the options given below is TRUE?
Let be a set and denote the powerset of . Define a binary operation on as follows: Let . Which of the following statements about is/are correct?
The value of the definite integral is _____. (Rounded off to the nearest integer)
Geetha has a conjecture about integers, which is of the form where is a statement about integers, and is a statement about pairs of integers. Which of the following (one or more) option(s) would imply
The Lucas sequence is defined by the recurrence relation: with Which one of the options given is TRUE?
Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with L levels for virtual to physical address translation. The page size is 4 KB (1 KB = 1024 B)
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?
Which one or more of the following CPU scheduling algorithms can potentially cause starvation?
Consider the two functions incr and decr shown below. incr(){ wait(s); X = X+1; signal(s); } decr(){ wait(s); X = X-1; signal(s); } There are 5 threads each invoking incr once, and 3 threads each invo
Consider the following two-dimensional array D in the C programming language, which is stored in row-major order: int D[128][128]; Demand paging is used for allocating memory and each physical page fr
Consider the C function foo and the binary tree shown. typedef struct node { int val; struct node *left, *right; } node; int foo(node *p) { int retval; if (p == NULL) return 0; else { retval = p->val
Consider the following program: int main() { f1(); f2(2); f3(); return(0); } int f1() { return(1); } int f2(int X) { f3(); if (X==1) return f1(); else return (X*f2(X-1)); } int f3() { return(5); } Whi
The integer value printed by the ANSI-C program given below is ______. #include int funcp(){ static int x = 1; x++; return x; } int main(){ int x,y; x = funcp(); y = funcp()+x; printf("%d ", (x+y)); r
Consider a sequence of elements . The following operations are performed on a stack and a queue , both of which are initially empty. I: push the elements of a from to in that order into . II: enqueue
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
Which one of the following sequences when stored in an array at locations A[1], . . . , A[10] forms a max-heap?
An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let be the number of keys, be the number of
Let A be a priority queue for maintaining a set of elements. Suppose A is implemented using a max-heap data structure. The operation Extract-Max(A) extracts and deletes the maximum element from A. The
Which of the following statements is/are CORRECT?
Consider the language L over the alphabet {0, 1}, given below: The minimum number of states in a Deterministic Finite-State Automaton (DFA) for L is _____.
Consider the context-free grammar below where and are non-terminals, and and are terminal symbols. The starting non-terminal is . Which one of the following statements is CORRECT?
Consider the pushdown automaton (PDA) below, which runs on the input alphabet , has stack alphabet , and has three states , with being the start state. A transition from state to state , labelled , wh
Consider the following definition of a lexical token for an identifier in a programming language, using extended regular expressions: Which one of the following Non-deterministic Finite-state Automata
Consider the Deterministic Finite-state Automaton (DFA) shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s, p, q, r}, with s being the start state and p being the only fina