Skip to content
Early access — you're among the first to try PYQLabs. Share feedback

GATE 2004 CSE & IT

98 questions across 1 session

PYQ 1

Consider a System with a two-level paging scheme in which a regular memory access takes $$150$$ nanoseconds, and servicing a page fault takes $$8$$ milliseconds. An average instruc...

Operating Systems·MCQ·✓ keyed
PYQ 2

Which one of the following is true for a $$CPU$$ having a single interrupt request line and single interrupt grant line?

Computer Organization·MCQ·medium·✓ keyed
PYQ 3

Consider a program $$P$$ that consists of two source modules $${M_1}$$ and $${M_2}$$ contained in two different files. If $${M_1}$$ contains a reference to a function defined in $$...

Operating Systems·MCQ·easy·✓ keyed
PYQ 4

Two matrices M 1 and M 2 are to be stored in arrays A and B respectively. Each array can be stored either in row-major or column-major order in contiguous memory locations. The tim...

Data Structures·MCQ·easy·✓ keyed
PYQ 5

A point is randomly selected with uniform probability in the X-Y plane within the rectangle with corners at (0, 0), (1, 0), (1, 2) and (0, 2). If p is the length of the position ve...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 6

Consider the following C program main ( ) { int x, y, m, n; scanf("%d %d", &x, &y); /* Assume x > 0 and y > 0 */ m=x; n=y; while(m!=n) { if(m>n) m=m-n; else n=n-m; } printf("%d", n...

Programming Languages·MCQ·easy·✓ keyed
PYQ 7

Let $$a(x,y)$$, $$b(x,y)$$ and $$c(x,y)$$ be three statements with variables $$x$$ and $$y$$ chosen from some universe. Consider the following statement: $$$\left( {\exists x} \rig...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 8

$$SR.$$ latch made by cross coupling two $$NAND$$ gates if $$S=R=0,$$ Then it will result in

Digital Logic·MCQ·easy·✓ keyed
PYQ 9

A program takes as input a balanced binary search tree with n leaf nodes and computes the value of a function g(x) for each node x. If the cost of computing g(x) is min{ no. of lea...

Data Structures·MCQ·medium·✓ keyed
PYQ 10

The following propositional statement is $$$\left( {P \to \left( {Q \vee R} \right)} \right) \to \left( {\left( {P \wedge Q} \right) \to R} \right)$$$

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 11

Consider a small two-way set-associative cache memory, consisting of four blocks. For choosing the block to be replaced, uses the least recently used $$(LRU)$$ scheme. The number o...

Computer Organization·MCQ·medium·✓ keyed
PYQ 12

Which of the following addressing modes are suitable for program relocation at run time? $$1.$$ Absolute addressing $$2.$$ Based addressing $$3.$$ Relative addressing $$4.$$ Indire...

Operating Systems·MCQ·medium·✓ keyed
PYQ 13

A $$4$$-stage pipeline has the stage delays as $$150, 120,160$$ and $$140$$ nano seconds respectively. Registers that are used between the stages have a delay of $$5$$ nanoseconds...

Computer Organization·MCQ·easy·✓ keyed
PYQ 14

Identify the correct translation into logical notation of the following assertion. $$Some\,boys\,in\,the\,class\,are\,taller\,than\,all\,the\,girls$$ Note: taller$$\left( {x,\,y} \...

Discrete Mathematics·MCQ·✓ keyed
PYQ 15

The Boolean function $$x'y' +xy +x'y$$ is equivalent to

Digital Logic·MCQ·easy·✓ keyed
PYQ 16

Consider the grammar rule $$E \to {E_1} - {E_2}$$ for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requi...

Compiler Design·MCQ·medium·✓ keyed
PYQ 17

How many $$8$$-bit characters can be transmitted per second over $$9600$$ baud serial communication link using a parity synchronous mode of transmission with one start bit & Eight...

Computer Organization·MCQ·easy·✓ keyed
PYQ 18

A single array A[1..MAXSIZE] is used to implement two stacks, The two stacks grow from opposite ends of the array. Variables top1 and top2 (top1 < top2) point to the location of th...

Data Structures·MCQ·easy·✓ keyed
PYQ 19

The number of different $$n$$ $$x$$ $$n$$ symmetric matrices with each elements being either $$0$$ or $$1$$ is (Note: power ($$2,$$ $$x$$) is same as $${2^x}$$)

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 20

The inclusion of which of the following sets into S = { {1, 2}, 1, 2, 3}, {1, 3, 5}, {1, 2, 4}, {1, 2, 3, 4, 5} } Is necessary and sufficient to make S a complete lattice under the...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 21

Consider the following C program segment: char p[20]; char *s = "string"; int length = strlen(s); for(i=0; i < length; i++) p[i] = s[length-i]; printf("%s",p); The output of the pr...

Programming Languages·MCQ·easy·✓ keyed
PYQ 22

Let R 1 ( A, B, C) and R 2 ( D, E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R 1 referring to R 2 . Suppose there is no vio...

Database Management System·MCQ·easy·✓ keyed
PYQ 23

A program attempts to generate as many permutation as possible of the string “abcd” by pushing the character a,b,c,d in the same order onto a stack, but it may pop off the top char...

Data Structures·MCQ·easy·✓ keyed
PYQ 24

What is the maximum number of edges in an acyclic undirected graph with $$n$$ vertices?

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 25

Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is First Come First Served $$(FCFS...

Operating Systems·MCQ·easy·✓ keyed
PYQ 26

The goal of structured programming is to

Programming Languages·MCQ·easy·✓ keyed
PYQ 27

An examination paper has 150 multiple-choice questions of one mark each, with each question having four choices. Each incorrect answer fetches-0.25 mark. Suppose 1000 students choo...

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 28

Which level of locking provides the highest degree of concurrency in a relational database?

Database Management System·MCQ·easy·✓ keyed
PYQ 29

A TCP message consisting of 2100 bytes is passed to IP for delivery across two networks. The first network can carry a maximum payload of 1200 bytes per frame and the second networ...

Computer Networks·MCQ·medium·✓ keyed
PYQ 30

What is the result of evaluating the following two expressions using three $$-$$ digit floating point arithmetic with rounding? $$\eqalign{ & \left( {113. + - 111.} \right) + 7.51...

Computer Organization·MCQ·medium·✓ keyed
PYQ 31

Assume that the operators +, -, ×, are left associative and ^ is right associative. The order of precedence (from highest to lowest) is ^, ×, +, -. The postfix expression correspon...

Data Structures·MCQ·easy·✓ keyed
PYQ 32

A and B are the only two stations on an Ethernet. Each has a steady queue of frames to send. Both A and B attempt to transmit a frame, collide, and A wins the first backoff race. A...

Computer Networks·MCQ·medium·✓ keyed
PYQ 33

Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true? i) 9679, 1989, 4199 hash to t...

Data Structures·STMT·easy·✓ keyed
PYQ 34

A relational database contains two table student and department in which student table has columns roll_no, name and dept_id and department table has columns dept_id and detp_name...

Database Management System·MCQ·easy·✓ keyed
PYQ 35

A Hard disk with a transfer rate of $$10Mbytes/second$$ is constantly transferring data to memory using $$DMA.$$ The processor runs at $$600MHz$$ and takes $$300$$ and $$900$$ cloc...

Computer Organization·MCQ·medium·✓ keyed
PYQ 36

$${73_x}$$ (in base $$-$$ $$x$$ number system) is equal to $${54_y}$$ (in base $$-y$$ number system), the possible values of $$x$$ and $$y$$ are

Digital Logic·MCQ·easy·✓ keyed
PYQ 37

Which of the following is NOT true with respect to a transparent bridge and a router?

Computer Networks·MCQ·easy·✓ keyed
PYQ 38

Consider the following C program segment struct CellNode{ struct CellNode *leftChild; int element; struct CellNode *rightChild; }; int Dosomething (struct CellNode *ptr) { int valu...

Data Structures·MCQ·easy·✓ keyed
PYQ 39

In an M$$ \times $$N matrix such that all non-zero entries are covered in $$a$$ rows and $$b$$ columns. Then the maximum number of non-zero entries, such that no two are on the sam...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 40

The best data structure to check whether an arithmetic expression has balanced parentheses is a

Data Structures·MCQ·easy·✓ keyed
PYQ 41

Consider the following relation schema pertaining to a students database: Students ( rollno , name, address) Enroll( rollno,courseno , coursename) Where the primary keys are shown...

Database Management System·MCQ·easy·✓ keyed
PYQ 42

Consider two tables in a relational database with columns and rows as follows: Table: Student Roll_no Name Dept_id 1 ABC 1 2 DEF 1 3 GHI 2 4 JKL 3 Table: Department Dept_id Dept_na...

Database Management System·MCQ·medium·✓ keyed
PYQ 43

What is the number of vertices in an undirected connected graph with $$27$$ edges, $$6$$ vertices of degree $$2$$, $$\,\,$$ $$3$$ vertices of degree 4 and remaining of degree 3?

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 44

What values of x, y and z satisfy the following system of linear equations? $$$\left[ {\matrix{ 1 & 2 & 3 \cr 1 & 3 & 4 \cr 2 & 3 & 3 \cr } } \right]\,\,\left[ {\matrix{ x \cr y \c...

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 45

Consider the following C function: void swap (int a, int b) { int temp; temp = a; a = b; b = temp; } In order to exchange the values of two variables x and y.

Programming Languages·MCQ·easy·✓ keyed
PYQ 46

The relation scheme student Performance (Name, CourseNo, RollNo, Grade) has the following functional dependencies: Name, courseNo $$\,\, \to \,\,$$ grade RollNo, courseNo $$\,\, \t...

Database Management System·MCQ·medium·✓ keyed
PYQ 47

The number of different $$n \times n$$ symmetric matrices with each elements being either $$0$$ or $$1$$ is

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 48

The problems 3-SAT and 2-SAT are

Algorithms·MCQ·easy·✓ keyed
PYQ 49

The time complexity of the following C function is (assume n > 0) int recursive(int n){ if(n == 1){ return (1); } return (recursive(n - 1) + recursive(n - 1)); }

Algorithms·MCQ·easy·✓ keyed
PYQ 50

The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of

Algorithms·MCQ·easy·✓ keyed
PYQ 51

The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of

Algorithms·MCQ·easy·✓ keyed
PYQ 52

The elements 32, 15, 20, 30, 12, 25, 16, are inserted one by one in the given order into a max Heap. The resultant max Heap is

Algorithms·MCQ·easy·✓ keyed
PYQ 53

Let A[1,...,n] be an array storing a bit (1 or 0) at each location, and f(m) is a function whose time complexity is O(m). Consider the following program fragment written in a C lik...

Algorithms·MCQ·medium·✓ keyed
PYQ 54

The recurrence equation T(1) = 1 T(n) = 2T(n - 1)+n, $$n \ge 2$$ Evaluates to

Algorithms·MCQ·medium·✓ keyed
PYQ 55

What does the following algorithm approximate? (Assume m > 1, $$ \in > 0$$) x = m; y = 1; while(x - y > ε){ x = (x + y) / 2; y = m/x; } print(x);

Algorithms·MCQ·medium·✓ keyed
PYQ 56

Consider a multiplexer with $$X$$ and $$Y$$ as data inputs and $$Z$$ as control input. If $$z=0$$ select input $$x,$$ and $$z=1$$ selects input $$Y$$. what are the connections requ...

Digital Logic·MCQ·easy·✓ keyed
PYQ 57

A sender is employing public key Cryptography to send a secret message to a receiver. Which one of the following statement is true?

Computer Networks·MCQ·easy·✓ keyed
PYQ 58

Level order traversal of a rooted tree can be done by starting from the root and performing

Data Structures·MCQ·easy·✓ keyed
PYQ 59

$$A$$ $$4$$-bit carry look ahead adder, which adds two $$4$$-bit numbers, is designed using $$AND,$$ $$OR,$$ $$NOT,$$ $$NAND,$$ $$NOR$$ gates only. Assuming that all the inputs are...

Computer Organization·MCQ·medium·✓ keyed
PYQ 60

Let $${G_1} = \left( {V,\,{E_1}} \right)$$ and $${G_2} = \left( {V,\,{E_2}} \right)$$ be connected graphs on the same vertex set $$V$$ with more than two vertices. If $${G_1} \cap...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 61

How many graphs on $$n$$ labeled vertices exist which have at least $$\left( {{n^2} - 3n} \right)/2\,\,\,$$ edges?

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 62

If a fair coin is tossed four times, what is the probability that two heads and two tails will result?

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 63

A circuit outputs a digit in the form of $$4$$ bits. $$0$$ is represented by $$0000$$, $$1$$ by $$0001..., $$ $$9$$ by $$1001.$$ A combinational circuit is to be designed which tak...

Digital Logic·MCQ·medium·✓ keyed
PYQ 64

In a depth-first traversal of a graph G with n vertices,k edges are marked as tree edges. The number of connected components in G is

Data Structures·MCQ·easy·✓ keyed
PYQ 65

Consider the following C function: int f(int n) { static int i = 1; if(n>=5) return n; n = n+1; i++; return f(n); } The value returned by f(1) is

Programming Languages·MCQ·easy·✓ keyed
PYQ 66

Let $$A=1111$$ $$1010$$ and $$B=0000$$ $$1010$$ be two $$8$$-bit $$2's$$ complement numbers. Their product in $$2's$$ complement is

Digital Logic·MCQ·easy·✓ keyed
PYQ 67

Consider the label sequences obtained by the following pairs of traversals on a labeled binary tree. Which of these pairs identify a tree uniquely? i) preorder and postorder ii) in...

Data Structures·MCQ·easy·✓ keyed
PYQ 68

Suppose that the maximum transmit window size for a TCP connection is 12000 bytes. Each packet consists of 2000 bytes. At some point of time, the connection is slow start phase wit...

Computer Networks·MCQ·medium·✓ keyed
PYQ 69

Choose the best matching between the programming style in Group 1 and their characteristics in Group 2 Group 1 P. Functional Q. Logic R. Object-oriented S. Imperative Group 2 1. Co...

Programming Languages·MTF·easy·✓ keyed
PYQ 70

Let P be a singly linked list, Let Q be the pointer to an intermediate node x in the list.What is the worst-case time complexity of the best known algorithm to delete the node x fr...

Data Structures·MCQ·easy·✓ keyed
PYQ 71

A relation Empdt $$1$$ is defined with attributes empcode (unique), name, street, city, state and pincode. For any pincode, there is only one city and state. Also, for any given st...

Database Management System·MCQ·medium·✓ keyed
PYQ 72

Which are the essential prime implicants of the following Boolean function? $$F\left( {a,b,c} \right) = {a^1}c + a{c^1} + {b^1}c$$

Digital Logic·MCQ·medium·✓ keyed
PYQ 73

Which of the following addressing modes are suitable for program relocation at run time? $$1.$$ Absolute addressing $$2.$$ Based addressing $$3.$$ Relative addressing $$4.$$ Indire...

Computer Organization·MCQ·easy·✓ keyed
PYQ 74

The order of an internal node in a B + tree index is the maximum number of children it can have. Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes,...

Database Management System·MCQ·medium·✓ keyed
PYQ 75

The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the max...

Data Structures·MCQ·easy·✓ keyed
PYQ 76

Consider the binary relation: $$S = \left\{ {\left( {x,y} \right)|y = x + 1\,\,and\,\,x,y \in \left\{ {0,1,2,...} \right\}} \right\}$$ The reflexive transitive closure of $$S$$ is

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 77

Which of the following grammar rules violate the requirements of an operator grammar? P, Q, R are nonterminals, and r, s, t are terminals. $$\eqalign{ & 1.\,P \to QR \cr & 2.\,P \t...

Compiler Design·MCQ·easy·✓ keyed
PYQ 78

Consider the following statements with respect to user-level threads and kernel-supported threads. i) Context switch is faster with kernel- supported threads ii) For user-level thr...

Operating Systems·STMT·medium·✓ keyed
PYQ 79

Let $${R_1}$$ be a relation from $$A = \left\{ {1,3,5,7} \right\}$$ to $$B = \left\{ {2,4,6,8} \right\}$$ and $${R_2}$$ be another relation from $$B$$ to $$C$$ $$ = \left\{ {1,2,3,...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 80

How many solutions does the following system of linear equations have? - x + 5y = - 1 x - y = 2 x + 3y = 3

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 81

Let A, B, C, D be $$n\,\, \times \,\,n$$ matrices, each with non-zero determination. If ABCD = I, then $${B^{ - 1}}$$ is

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 82

In a class of 200 students, 125 students have taken Programming Language course, 85 students have taken Data Structures course, 65 student have taken Computer Organization coures;...

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 83

Two n bit binary stings, S1 and, are chosen randomly with uniform probability. The probability that the Hamming distance between these strings (the number of bit positions where th...

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 84

Choose the best matching between Group 1 and Group 2 : Group –1 P. Data link layer Q. Network layer R. Transport layer Group – 2 1. Ensures reliable transport of data over a physic...

Computer Networks·MTF·easy·✓ keyed
PYQ 85

The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by.

Operating Systems·MCQ·medium·✓ keyed
PYQ 86

Consider the grammar with the following translation rules and E as the start symbol. $$\eqalign{ & E \to {E_1}\# T\,\,\left\{ {E.value = {E_1}.value*T.value} \right\} \cr & \,\,\,\...

Compiler Design·MCQ·medium·✓ keyed
PYQ 87

Mala has a colouring book in which each English letter is drawn two times. She wants to paint each of these 52 prints with one of $$k$$ colours, such that the colour-pairs used to...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 88

In a population of N families, 50% of the families have three children, 30% of the families have two children and the remaining families have one child. What is the probability tha...

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 89

Consider a table T in a relational database with a key field K. A B-tree of order p is used as an access structure on K, where p denotes the maximum number of tree pointers in a B-...

Database Management System·MCQ·medium·✓ keyed
PYQ 90

If matrix $$X = \left[ {\matrix{ a & 1 \cr { - {a^2} + a - 1} & {1 - a} \cr } } \right]$$ and $${X^2} - X + 1 = 0$$ ($${\rm I}$$ is the identity matrix and $$O$$ is the zero matrix...

Discrete Mathematics·MCQ·✓ keyed
PYQ 91

The employee information in a company is stored in the relation Employee (name, sex, salary, deptName) Consider the following SQL query Select deptName From Employee Where sex = ‘M...

Database Management System·MCQ·easy·✓ keyed
PYQ 92

The recurrence equation $$\,\,\,\,\,\,\,T\left( 1 \right) = 1$$ $$\,\,\,\,\,\,T\left( n \right) = 2T\left( {n - 1} \right) + n,\,n \ge 2$$ evaluates to

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 93

Let $$p, q, r$$ and $$s$$ be four primitive statements. Consider the following arguments: $$P:\left[ {\left( {\neg p \vee q} \right) \wedge \left( {r \to s} \right) \wedge \left( {...

Discrete Mathematics·MCQ·medium·✓ keyed
PYQ 94

In how many ways can we distribute 5 distinct balls, $${B_1},{B_2},......,{B_5}$$ in 5 distinct cells, $${C_1},{C_2},.....,{C_5}$$ such that Ball $${B_i}$$ is not in cell $${C_i}$$...

Discrete Mathematics·MCQ·easy·✓ keyed
PYQ 95

Let $$M = \left( {K,\,\sum {,\,F,\,\Delta ,\,s,\,F} } \right)$$ be a pushdown automation. Where $$K = \left\{ {s,\,f} \right\},\,F = \left\{ f \right\},\,\sum { = \left\{ {a,b} \ri...

Theory of Computation·MCQ·✓ keyed
PYQ 96

Consider the following grammar $$G:$$ $$\eqalign{ & S \to bS\,\left| {\,aA\,\left| {\,b} \right.} \right. \cr & A \to bA\,\left| {\,aB} \right. \cr & B \to bB\,\left| {\,aS\,\left|...

Theory of Computation·MCQ·medium·✓ keyed
PYQ 97

Which of the following grammar rules violate the requirements of an operator grammar ? $$P,$$ $$Q, R$$ are non-terminals and $$r, s, t$$ are terminals. $$$\eqalign{ & 1)\,\,\,P \to...

Theory of Computation·MCQ·easy·✓ keyed
PYQ 98

The language $$\left\{ {{a^m}{b^n}{c^{m + n}}\left| {m,n \ge } \right.} \right\}$$ is

Theory of Computation·MCQ·easy·✓ keyed