GATE CS question library
Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.
Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.
20 on this page
Consider the following tree with nodes, in which a node can store at most key values The value is now inserted in the tree. Which of the following options(s) is/are CORRECT?
Consider the -way handshaking protocol for TCP connection establishment. Let the three packets exchanged during the connection establishment be denoted as , and , in order. Which of the following option(s) is/are TRUE with respect to TCP header flags that are set in the packets?
Consider the given system of linear equations for variables and , where is a real-valued constant. Which of the following option(s) is/are CORRECT?
Let be a -variable Boolean function that produces output as when at least two of the input variables are . Which of the following statement(s) is/are CORRECT, where are Boolean variables?
The number can be represented as in -bit 's complement representation. Which of the following is/are CORRECT 's complement representation(s) of ?
Which of the following statement(s) is/are TRUE for any binary search tree (BST) having distinct integers?
A partial data path of a processor is given in the figure, where and are -bit registers. Which option(s) is/are CORRECT related to arithmetic operations using the data path as shown?
A regular language is accepted by a non-deterministic finite automaton (NFA) with states. Which of the following statement(s) is/are FALSE?
Let be the set of all ternary strings defined over the alphabet . Consider all strings in that contain at least one occurrence of two consecutive symbols, that is, , or . The number of such strings of length that are possible is __________. (Answer in integer).
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 …
Consider the given function . If the function is differentiable everywhere, the value of must be ________. (rounded off to one decimal place)
A box contains coins: regular coins and fake coin. When a regular coin is tossed, the probability head and for a fake coin, head . You pick a coin at random and toss it twice, and get two heads. The probability that the coin you have chosen is the fake coin is __________. (rounded off to two decimal places)
The pseudocode of a function is given below: fun(int A[0,....,n-1]) { for i=0 to n-2 for j=0 to n-i-2 if (A[j]>A[j+1]) then swap A[j] and A[j+1] } Let be an array storing distinct integers in descending order. The number of swap operations that will be performed, if the function is called …
#include <stdio.h> void foo(int *p, int x) { *p=x; } int main(){ int *z; int a = 20, b = 25; z = &a; foo(z,b); printf("%d",a); return 0; } The output of the given program is __________. (Answer in integer)
The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node. Suppose a Min-Heap stores keys. The height of is ___________. (Answer in integer)
Consider a memory system with bytes of main memory and bytes of cache memory. Assume that the processor generates -bit memory address, and the cache block size is bytes. If the cache uses direct mapping, how many bits will be required to store all the values? [Assume memory is byte …
A processor has general-purpose registers and distinct instruction types. An instruction is encoded in -bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction? , / /
A computer has two processors, and . Four processes with CPU bursts of , and 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: uses priority …
Consider two relations describing teams and players in a sports league: teams(tid, tname): tid, tname are team-id and team-name, respectively players(pid,pname,tid): pid, pname, and tid denote player-id, playername and the team-id of the player, respectively Which ONE of the following tuple relational calculus queries returns the name of the players who play …
A packet with the destination address arrives at a router whose routing table is shown. Which interface will the packet be forwarded to? …
