0% found this document useful (0 votes)
2 views24 pages

FLT-1

The document provides a summary of a mock GATE exam with details on questions attempted, correct answers, and overall performance metrics. It includes specific questions from various subjects such as Quantitative Aptitude, Technical, and Databases, along with the correct answers for each question. The exam consisted of 65 questions with a total score of 100 marks, and the user did not attempt any questions, resulting in zero marks.

Uploaded by

shahbajbano226.2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views24 pages

FLT-1

The document provides a summary of a mock GATE exam with details on questions attempted, correct answers, and overall performance metrics. It includes specific questions from various subjects such as Quantitative Aptitude, Technical, and Databases, along with the correct answers for each question. The exam consisted of 65 questions with a total score of 100 marks, and the user did not attempt any questions, resulting in zero marks.

Uploaded by

shahbajbano226.2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

2/6/25, 6:01 PM gateoverflow.in/quiz/results.

php

Summary in Graph

Exam Summary (GO Classes CS Test Series 2025 | Mock


GATE | Test 1)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 65
30 + 35

Total Marks: 100


30 + 70

Exam Duration: 180 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Aptitude

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Quantitative Aptitude

If j and k are integers and j − k is even, which of the following must be even?

A. jk − 2j
B. jk
C. 2j + k
D. jk + j

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Quantitative Aptitude

If c and d are positive integers and m is the greatest common factor of c and d, then m must be the greatest
common factor of c and which of the following integers?

A. c + d
B. cd
C. 2d
D. d 2

https://gateoverflow.in/quiz/results.php 1/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Quantitative Aptitude

If a + b + c = 0 then what is the value of (a + b)(b + c)c/2ac 2


?

A. −1
B. 1/2
C. −1/2
D. 1

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Quantitative Aptitude

If 0 < st < 1 , then which of the following can be true?

A. s < −1 and t > 0


B. s < −1 and t < −1

C. s > −1 and t < −1

D. s > 1 and t < −1

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Verbal Aptitude

Fifty dollars are the high price to pay for this bag.
––––––––

Which of the following options can correctly replace the underlined words in the above sentence?

A. Were the
B. is a
C. are a
D. is the

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #6 Multiple Choice Type Award: 2 Penalty: 0.67 Quantitative Aptitude

Twenty workers finish a piece of work in 30 days. After how many days should 5 workers leave the job so that
the work is completed in 35 days?

A. 10 Days
B. 15 Days
C. 20 Days
D. 25 Days

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #7 Multiple Choice Type Award: 2 Penalty: 0.67 Quantitative Aptitude

https://gateoverflow.in/quiz/results.php 2/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

In a class of 170 students, 155 students take part in either one or more than one game of either chess,
football or hockey. A total of 21 students take part in any two of the games. 54 students take part only in
football, whereas 43 students take part in hockey only. Only 5 students take part in all the three games. How
many students take part only in chess?

A. 32
B. 35
C. 45
D. 30

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #8 Multiple Choice Type Award: 2 Penalty: 0.67 Spatial Aptitude

A paper is folded and punched as shown below.

Which of the following options correctly represents the paper once opened?

A.

B.

C.

D.

https://gateoverflow.in/quiz/results.php 3/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 03sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Quantitative Aptitude

A train crosses a pole in 12 seconds and a bridge of length 170 meters in 36 sec. The speed of the train is
_____

A. 30.75 km/h
B. 32.45 km/h
C. 25.5 km/h
D. 10.8 km/h

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Analytical Aptitude

Consider the following statements:

No Rat is a Cat.
Some Bats are Cats.

Which of the following conclusions can be inferred?

I. Some Cats are not Rats


II. All Rats are Bats is a possibility
III. No Bat is Rat

A. Only Conclusion (i) follows


B. Both (i)&(iii) follow
C. Both (i)&(ii) follow
D. All conclusions follow

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Technical

Q #1 Multiple Select Type Award: 1 Penalty: 0 Programming in C

Consider the following C declarations:

struct s {
int x, y;
};
struct s sarr[20];

Which of the following expressions is semantically equivalent to “sarr[10].x”?

A. (sarr + 10)→x

B. (&sarr + 10).x

C. *(sarr + 10 * sizeof(struct s)).x

https://gateoverflow.in/quiz/results.php 4/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

D. ((char *)sarr + 10 * sizeof(struct s))→x

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Algorithms

Let f (n) be a positive increasing function.


Consider the below two statements about time complexities of an algorithm.

S1: if an algorithm is Θ(f (n)) in the average case, then it is Ω(f (n)) in the worst case.
S2: if an algorithm is Θ(f (n)) in the average case, then it is O(f (n)) in the best case. Here O is Big-oh.

Which of the following options is CORRECT?

A. S1 is true but S2 is false


B. S2 is true but S1 is false
C. Both are true
D. Both are false

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Algorithms

If we assume uniform hashing with open addressing, what is the probability that a collision will occur while
inserting 3 keys, one after another in a hashtable with 1000 buckets?

A. 3

1000

B. 1 − 3

1000

C. 999

1000
×
998

1000
×
997

1000

D. 1 − ( 999

1000
×
998

1000
)

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Probability

A bizarre weighted coin comes up heads with probability 1/2, tails with probability 1/3, and rests on its edge
with probability 1/6. If it comes up heads, you win ₹1. If it comes up tails, you win ₹3. However, if it lands on
its edge, you lose ₹5. What is the expected winnings (in rupees) from flipping this coin?

A. 2/3
B. 1/2
C. 1/4
D. None of the above

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Select Type Award: 1 Penalty: 0 Linear Algebra

https://gateoverflow.in/quiz/results.php 5/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

For any matrix M, let det(M ) denotes the determinant of M. Which of the following(s) is/are CORRECT?

A. For all n × n matrices A and B, det(AB) = det(A) ⋅ det(B) .


B. For all n × n matrices A and B, det(A+B) = det(A) + det(B) .
C. For all n × n matrices A and B, det(AB) = det(BA)

D. For any n × n matrix A det(kA) = k ⋅ det(A) , Here k is a scalar number.

Your Answer: Correct Answer: A;C Not Attempted Time taken: 00min 00sec Discuss

Q #6 Multiple Choice Type Award: 1 Penalty: 0.33 Mathematical Logic

Let F, G, H be three atomic propositions.


What is the relation between propositions P and Q?

P: (F ∧ G) ⇒ H

Q: F ⇒ (G ⇒ H)

A. P, Q are logically equivalent.


B. P is a logical consequence of Q, but Q is not a logical consequence of P.
C. Q is a logical consequence of P, but P is not a logical consequence of Q.
D. P, Q are not related in any of the ways above.

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #7 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

In the database systems, the size of a data item is called its granularity. A data item can be a database record,
but it can also be a larger unit such as a whole disk block, or even a smaller unit such as an individual field
(attribute) value of some record in the database.

The granularity of the data items is the portion of the database a data item represents. Granularity(size) of
data items can affect the amount of Concurrency we can achieve with concurrent execution of transactions.

In some database systems, data items are protected by locks to ensure correct behavior in the presence of
concurrency. Locking is said to be "fine-grained" if each lock protects only a few data items; it is said to be
"coarse-grained" if each lock protects many data items. The following performance graph is typical.

Between points 1 and 2, system throughput increases because

A. locking overhead decreases


B. locking overhead increases
C. fewer transactions desire to access data
D. greater concurrency is possible

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #8 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

https://gateoverflow.in/quiz/results.php 6/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Complete the following ER diagram to enforce that every student must be enrolled in at least one class and
that classes can have any number of students.

A. (a) is a Bold Line without an arrow, (b) is a Bold Line without an arrow.
B. (a) is a Bold Line with an arrow, (b) is a Bold Line without an arrow.
C. (a) is a Bold Line without an arrow, (b) is a thin Line without an arrow.
D. (a) is a thin Line without an arrow, (b) is a bold Line without an arrow.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Choice Type Award: 1 Penalty: 0.33 Digital Logic

A MUX circuit shown in the figure below implements a logic function F . 1

The correct expression for F is 1

A. (X ⊕ Y ) ⊕ Z
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

B. (X ⊕ Y ) ⊕ Z
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

C. (X ⊕ Y ) ⊕ Z
¯
¯¯¯

D. (X ⊕ Y ) + Z

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #10 Multiple Choice Type Award: 1 Penalty: 0.33 Digital Logic

Consider the logic circuit with input signal TEST shown in the figure. All gates in the figure shown have
identical non-zero delay. The signal TEST which was at logic LOW is switched to logic HIGH and maintained at
logic HIGH. The output

A. stays HIGH throughout


B. stays LOW throughout
C. pulses from LOW to HIGH to LOW
D. pulses from HIGH to LOW to HIGH

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

https://gateoverflow.in/quiz/results.php 7/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Q #11 Multiple Choice Type Award: 1 Penalty: 0.33 CO and Architecture

A CPU has an arithmetic unit that adds bytes and then sets its V , C, and Z flag bits as follows: The V -bit is
set if arithmetic overflow occurs (in two’s complement arithmetic). The C -bit is set if a carry-out is generated
from the most significant bit during an operation. The Z -bit is set if the result is zero.
What are the values of the V , C, and Z flag bits (in that order) after the 8-bit bytes
1100 1100 and 1000 1111 are added?

A. 0 0 0

B. 1 1 0

C. 1 1 1

D. 0 0 1

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #12 Numerical Type Award: 1 Penalty: 0 CO and Architecture

A digital computer has a byte-addressable memory unit with 16 bits per word. The instruction set consists of
40 different operations. All instructions have an operation code part and two address fields: one for a
memory address and one for a register address. This machine has six general-purpose, user-addressable
registers. Registers may be loaded directly from memory, and memory may be updated directly from the
registers. Direct memory-to-memory data movement operations are not supported. Each instruction is stored
in one word of memory. What is the maximum allowable size for memory (assuming all of memory is
addressable in an instruction) in words?

Your Answer: Correct Answer: 64 Not Attempted Time taken: 00min 00sec Discuss

Q #13 Multiple Choice Type Award: 1 Penalty: 0.33 CO and Architecture

Suppose that {S 1, S2 , … , SN } is a set of fixed-length strings ordered alphabetically so that


S1 < S2 < … SN . If these strings are held, in order, in an array of N elements, then the time required to
find the location of S i+1 , given the location of S i, 1 ≤ i < N is

A. Θ(1)
B. Θ(log 2
N)

C. Θ(N )
D. Θ(N log 2
N)

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #14 Numerical Type Award: 1 Penalty: 0 Operating System

Virtual page numbers and physical frame numbers are represented in decimal. Consider a machine with 32-
bit virtual addresses and a page size of 512 bytes. During a program execution, the TLB contains the
following valid entries (all in decimal).

Virtual Page Num Physical Frame Num

591 100

5912 200

11548 300

2589 400

59125 500

https://gateoverflow.in/quiz/results.php 8/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Translate the virtual address = 5912589 (in decimal) into a physical address (in decimal).

Your Answer: Correct Answer: 153613 Not Attempted Time taken: 00min 00sec Discuss

Q #15 Multiple Choice Type Award: 1 Penalty: 0.33 Computer Networks

The diagram below illustrates Router R1 sending a datagram to host H through Router R2.

Link L only permits a MTU of 1500 bytes. Link L only permits a MTU of 1100 bytes. (MTU= Maximum
1 2

Transfer Unit)
A is an IP datagram which

I. Has size 4000 bytes (the size of a datagram includes its header)
II. Is not using any of the option fields in its header.

Because A is larger than the MTUs of Links L and L , A must be fragmented as it is sent from R1 to H.
1 2

Assume that all datagrams sent are received successfully.

In order for Host H to receive the data in A, How many IP datagrams does H receive?

A. 2
B. 3
C. 4
D. 5

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #16 Multiple Select Type Award: 1 Penalty: 0 Compiler Design

Which of the following could be a reason for a grammar to NOT be LL(1)?

A. The grammar is not left-factored


B. The grammar is left-recursive
C. The grammar is ambiguous
D. The grammar is not LR(1)

Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #17 Numerical Type Award: 1 Penalty: 0 Databases

Consider the following relational database tables R, S and T:

R S T

A B B C A C

1 2 6 2 7 1

3 2 2 4 1 2

5 6 8 1 9 3

7 8 8 3 5 4

9 8 2 5 3 5

What is the number of tuples in the result of the following relational algebra query:

πA, B (R ⋈ S) ⋈ πA, C (S ⋈ T)?

https://gateoverflow.in/quiz/results.php 9/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Your Answer: Correct Answer: 5 Not Attempted Time taken: 00min 00sec Discuss

Q #18 Multiple Choice Type Award: 1 Penalty: 0.33 Theory of Computation

Assume you have to build push-down automaton simulating a natural language processor recognizing
numerical palindromes of even length. Which of the following grammars G = (V , V , S, P ) help you N T

building the solution:

A. V N = {S}, VT = {0, … , 9}, S, P = {S → 0S0|1S1| … |9S9|λ}

B. V N = {S}, VT = {0, … , 9}, S, P = {S → 0S0|1S1| … |9S9|0| … |9}

C. V N = {S}, VT = {0, … , 9}, S, P = {S → 0S0|1S1| … |9S9|0| … |9 ∣ λ}

D. None of the above

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #19 Numerical Type Award: 1 Penalty: 0 Graph Theory

In how many ways can we color the following labeled graph G with three colors R, G, B such that no two
adjacent vertices are assigned the same color?

Your Answer: Correct Answer: 12 Not Attempted Time taken: 00min 00sec Discuss

Q #20 Multiple Select Type Award: 1 Penalty: 0 Algorithms

A recursive algorithm reduces a problem on inputs of size n to four subproblems on inputs of size n/2 and
then combining the results. The combining step takes f (n) steps. We want our algorithm to have complexity
O (n )
2
. Which of the following are acceptable complexities for the combining step? There may be more than
one right answer.

A. f (n) = O(1) .
B. f (n) = O(n) .
C. f (n) = O(n log n) .
D. f (n) = Θ (n )
2

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss

Q #21 Multiple Choice Type Award: 1 Penalty: 0.33 Theory of Computation

Let Σ = {a, b} , and L = {a wa


n n
: n ≥ 1, w ∈ Σ }

. Consider the following statements:

i. L has regular expression a + ∗


(a + b) a
+
; where a +
= aa

https://gateoverflow.in/quiz/results.php 10/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

ii. There exists a context-free grammar for L.

Which of the following is true?

A. Only statement (i) is correct.


B. Only statement (ii) is correct.
C. Both (i), (ii) are correct.
D. Neither (i) nor (ii) is correct.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #22 Multiple Choice Type Award: 1 Penalty: 0.33 DS

Consider the two statements given below:

S1: There exists an algorithm to build a binary heap from an unsorted list in O(n) time.
S2: There exists an algorithm to build a binary search tree from an unsorted list in O(n) time.

Which of the following option is CORRECT?

A. S1 is true but S2 is false


B. S2 is true but S1 is false
C. Both the statements are true
D. Both the statements are false

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #23 Numerical Type Award: 1 Penalty: 0 Programming in C

Consider the following function parameterMystery which takes three arguments and returns an integer.

#include<stdio.h>
int parameterMystery(int *b, int *c, int a) {
(*b)++;
*c += 3;
5. a += 5;
return a;
}

int main() {
10. int a = 10;
int b = 200;
int c = 3000;
parameterMystery(&a, &b, c);
int d = parameterMystery(&b, &c, a);
15. printf("%d", d);
return 0;
}

What will be the output printed by the above program?

Your Answer: Correct Answer: 16 Not Attempted Time taken: 00min 00sec Discuss

Q #24 Numerical Type Award: 1 Penalty: 0 Programming in C

What will be the output printed by the following program?

https://gateoverflow.in/quiz/results.php 11/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

#include<stdio.h>
int func(int v[3], int n)
{
static int s = 0;
5. if(n == 1) return n;
int m = func(v, n-1);
s++;
if(v[n-1] > m) return v[n-1];
else return m;
10. }

int main()
{
int v[5] = {1, 4, 3, 6, 2};
15. printf("%d", func(v, 5));
return 0;
}

Your Answer: Correct Answer: 6 Not Attempted Time taken: 00min 00sec Discuss

Q #25 Numerical Type Award: 1 Penalty: 0 Operating System

A system has 6 distinct resources (each resource is of different type) and N processes competing for them.
Each process can request at most two resources. What is the maximum value of N which will never lead to
deadlock? We need to consider the worst-case scenario where our solution does not rely on a particular
assignment of resources to the processes.

Your Answer: Correct Answer: 1 Not Attempted Time taken: 00min 00sec Discuss

Q #26 Multiple Choice Type Award: 2 Penalty: 0.67 Compiler Design

Consider the LL(1) grammar with following rules-

S → aS ∣ Ab

A → XY Z ∣ ϵ

X → cS ∣ ϵ

Y → dS ∣ ϵ

Z → eS

In LL(1) parsing, at each step in the parse the rule that must be chosen is uniquely determined by the
current nonterminal and the next one lookahead symbol.

How many steps would the LL(1) parser take to parse string aebb?

A. 7
B. 8
C. 9
D. 10

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #27 Multiple Select Type Award: 2 Penalty: 0 Compiler Design

https://gateoverflow.in/quiz/results.php 12/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Consider the program below. In the context of liveness analysis of the program, assume that no variable is live
at the end of the code.

Which variables are live immediately at the end of line 4 (indicated by “looky here”)?

A. a
B. b
C. c
D. d

Your Answer: Correct Answer: A;B Not Attempted Time taken: 00min 00sec Discuss

Q #28 Multiple Select Type Award: 2 Penalty: 0 Compiler Design

Consider the grammar

A ::= x B | C x
B ::= z A | ε
C ::= y A | z C

where {A, B, C} is the set of nonterminal symbols, A is the start symbol, {x, y, z} is the set of terminal
symbols, and ‘ε’ denotes the empty string. The grammar is LL(1). Assume that a recursive descent parser for
the above grammar declares a variable ‘next’ of type token, and that the program has three procedures
A(), B(), C(), and the following main part:

void main() {
next = getnexttoken();
P
}

The procedure getnexttoken() gets the next token from an input file. Assume also we have the following
helper procedure, written in pseudo-code:

void eat(token t) {
if (t == next) {
next = getnexttoken();
}
5. else {
error();
}
}

The procedure B() looks like:

https://gateoverflow.in/quiz/results.php 13/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

if (next == z) {
eat(z);
A();
}
5. else {
Q
}

The procedure C() looks like:

if (next == y) {
eat(y);
A();
}
5. else {
R
}

Which of the following is/are correct statements for P, Q, R?

A. P: A();

B. Q: /* do nothing */

C. Q: error();

D. R: if (next == z) { eat(z); C() } else { error(); }

Your Answer: Correct Answer: A;B;D Not Attempted Time taken: 00min 00sec Discuss

Q #29 Multiple Select Type Award: 2 Penalty: 0 Programming in C

Consider the following 8 statements. (p and q have type char*. )

a. free(p);
b. free(q);
c. p = q;
d. q = NULL;
5. e. p = (char*) malloc(12);
f. q = (char*) malloc(8);
g. p[8] = 0;
h. q[4] = 0;

Also, consider the following types of errors -

Memory leak: Allocated piece of memory from the heap is not freed
Double-free: Freeing up already freed memory
Out of bounds write: Writing on the memory which is not allocated

We need to put the statements in an order that would execute with or without error.

Which of the following is/are true?

A. efghadbc will produce memory leak.


B. efghbcad will produce memory leak.
C. cdefghab will not produce any error.
D. eafhcgbd will produce Out of bounds write.

Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #30 Multiple Select Type Award: 2 Penalty: 0 Algorithms

https://gateoverflow.in/quiz/results.php 14/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Consider the following graph with integer edge weights, some of which are unknowns indicated by x, y, and
z. The minimum spanning tree (MST) is also drawn on the graph using bold lines.

Which of the following inequality bounds are satisfied by x, y or z?

A. x ≥ 9
B. y ≤ 6
C. z ≥ 12
D. z ≥ y

Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #31 Multiple Choice Type Award: 2 Penalty: 0.67 Algorithms

An algorithm takes a list of 2 numbers [a


n
1, a 2 , … , a 2n ] and replaces it with [b 1, b2 , … , b
2
n−1 ] , where
b1 = max {a1 , a2 } , b2 = max {a3 , a4 } , and so on. Then it performs the same operation on the resulting list
(replacing each pair of consecutive elements with their maximum), and it continues doing the same until
there are only two elements left in the list. For instance, if the initial list is [3, 7, 6, 8, 2, 1, 4, 5], then after the
first run, it becomes [7, 8, 2, 5] and then [8, 5].

Suppose that the elements of the initial list are the integers 1 through 128 in random order. What is the
probability that the number 127 will appear in the final two-element list?

A. 63/127
B. 64/127
C. 1/127
D. 1/128

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #32 Multiple Select Type Award: 2 Penalty: 0 DS

Consider the following pseudo-code which manipulates a queue q.


The algorithm uses standard queue operations defined below -

enqueue(x)− Insert element x to the back of the queue.


dequeue()− Remove elements from the front of the queue
peak− Get the first element of the queue without removing it.

size−Return the number of elements in the queue.


isEmpty− To check if the queue is empty.

https://gateoverflow.in/quiz/results.php 15/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Which of the following statements is/are correct for ‘mystery’?

A. If q is non-empty and doesn’t contain x, then mystery doesn’t modify q.


B. If q is non-empty and doesn’t contain x, then mystery reverses q.
C. If q is non-empty and contains x, then mystery doesn’t modify q.
D. mystery works the same if we remove the ‘return;’ statement on line 4.

Your Answer: Correct Answer: A;D Not Attempted Time taken: 00min 00sec Discuss

Q #33 Numerical Type Award: 2 Penalty: 0 DS

Consider a specific queue called PrintQueue. Along with enqueue and dequeue, PrintQueue supports one
additional called printpeak which prints front of queue without dequeuing it. Suppose the initial content of
PrintQueue is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Where 1 is at front and 10 is at rear. Using only supported
functions(enqueue, dequeue and printpeak), We want to print all elements of PrintQueue in reverse order
(output should be 10, 9, 8, … .1 ) such that final content of PrintQueue remains unchanged. Total how many
minimum calls to enqueue, dequeue and printpeak will be needed to accomplish the above task?

Your Answer: Correct Answer: 190 Not Attempted Time taken: 00min 00sec Discuss

Q #34 Numerical Type Award: 2 Penalty: 0 DS

A Binary Search Tree (BST) is generated (by successive insertion of nodes) from each permutation of keys from
the set {1, 2, 3, 4, 5, 6, 7}. How many permutations determine trees of height two? (Height of the tree is the
number of edges in the tree from the root to the farthest leaf node, Height of a single node tree is 0).

Your Answer: Correct Answer: 80 Not Attempted Time taken: 00min 00sec Discuss

Q #35 Multiple Choice Type Award: 2 Penalty: 0.67 Probability

Two factories supply light bulbs to the market. Bulbs from factory X work for over 5000 hours in 99% of
cases, whereas bulbs from factory Y work for over 5000 hours in 95% of cases. It is known that factory X
supplies 60% of the total bulbs available in the market.

Given that a light bulb works for more than 5000 hours, what is the probability that it was supplied by factory
Y?

A. 0.23
B. 0.39
C. 0.97
D. 0.56

https://gateoverflow.in/quiz/results.php 16/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #36 Multiple Select Type Award: 2 Penalty: 0 Linear Algebra

Let u i ’s be vectors in R for i n


= 1, 2, 3, 4 .

Which of the following options is/are CORRECT?

A. If {u 1, u2 , u3 } is linearly dependent, so is {u 1, u2 } .
B. If u is not a linear combination of {u
4 1, u2 , u3 } , then {u 1, u2 , u3 , u4 } is linearly independent.
C. Any set containing the zero vector is linearly dependent.
D. If {u , u , u } is linearly dependent, so is {u , u , u , u }.
1 2 3 1 2 3 4

Your Answer: Correct Answer: C;D Not Attempted Time taken: 00min 00sec Discuss

Q #37 Multiple Choice Type Award: 2 Penalty: 0.67 Theory of Computation

Let L be the language generated by the grammar G = (VN , VT , S, P) where


VN = {S, A, B, C, X, Y, Z}, VT = {a, b, c} , and
P = {S → λ | AX | BY | C Z, X → λ | BY | CZ, Y → λ | AX | CZ,

Z → λ | AX | BY, A → a, B → b, C → c} .

Let s be the number of strings from L with length n. For every n


n > 1 , the following recursive relation holds:

A. s n = 2 ⋅ sn−1

B. s n = 3 ⋅ sn−1

C. s n = sn−1 + 2 ⋅ sn−2

D. s n = 3sn−1 + sn−2

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #38 Multiple Select Type Award: 2 Penalty: 0 Theory of Computation

Which of the following languages is/are non-recursive but recursively-enumerable?

A. L 1 = {⟨M⟩ ∣ M is a TM which loops on the string aabbab }


B. L 2 = {⟨M, w⟩ ∣ M is a TM that halts on w }

C. L 3 = {⟨M⟩ ∣ M is a TM which accepts the string aabbab in less then 2023 steps }
D. L 4 = {⟨M⟩ ∣ M is a TM and L(M) is regular }

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #39 Multiple Choice Type Award: 2 Penalty: 0.67 Theory of Computation

Consider an output-producing, deterministic finite state automaton (DFA) of the kind indicated in the figure
below, in which it is assumed that every state is a final state.

https://gateoverflow.in/quiz/results.php 17/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Assume that the input is at least four bits long. Which of the following statements is(are) true?

P. If the input ends with “1100", then the output must end with “1" regardless of the start state.
Q. For any start state, the output cannot end with “1" unless the input ends with “1100".

A. Only P
B. Only Q
C. Both P, Q
D. None

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #40 Multiple Select Type Award: 2 Penalty: 0 Graph Theory

An undirected graph is complete if there is an edge between every pair of vertices. Given a complete
undirected graph G on n > 2 vertices, it can be converted into a directed graph G by choosing a direction

for each edge of G so that there are no directed cycles G . Which of the following is/are true about G ?
′ ′

A. There is a unique topological order for G .


B. There is a unique path from any vertex to any other vertex in G .


C. There is a unique vertex v in G with in-degree 0.


D. If we arbitrarily delete one vertex from G and all the edges incident on it, then the resultant graph will

also have a unique topological order.

Your Answer: Correct Answer: A;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #41 Multiple Select Type Award: 2 Penalty: 0 Graph Theory

A tree is a connected acyclic undirected graph.

Consider Only the labeled trees on n > 2 vertices, with distinct labels for vertices from {1, 2, … , n}.

The Prüfer Code of a Tree is defined as follows:

Given a labeled tree T with n > 2 vertices, repeat the following step:

delete the leaf with the smallest label and record the label of its parent until only a single edge remains.

The resulting sequence is called the Prüfer code of the tree.

Which of the following is/are true for the Prüfer code of the tree?

A. Every tree has a unique Prüfer code.


B. The Prüfer code of a tree on n > 2 vertices has length n.
C. The number of occurrences of the label ′
i

in the Prüfer code is one less than the degree of the vertex ′
i

in the original tree.


D. Prüfer code of tree T has distinct values in all positions if and only if T is a path graph.

https://gateoverflow.in/quiz/results.php 18/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Your Answer: Correct Answer: A;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #42 Multiple Choice Type Award: 2 Penalty: 0.67 Set Theory & Algebra

Let S = {a, b} be an alphabet, with total order a < b . Let Σ = S



be the set of all strings over S; for
w = s1 s2 … sn ∈ Σ we write ℓ(w) = n , and for 1 ⩽ r ⩽ n = ℓ(w) we write w r = s1 s2 … sr . Denote by ε
the unique word of Σ such that ℓ(ε) = 0 , the null string. Conventionally w 0 = ε for all words w ∈ Σ .

Define relation ≺ on Σ as follows:

Let v, w ∈ Σ , and n = min{ℓ(v), ℓ(w)} . Let r = max {i ∣ vi = wi } ⩽ n .

Then v ≺ w if:

either (i) ℓ(v) = r

or (ii) vr+1 = vr a, wr+1 = wr b, where vr = wr .

Which of the following is true for (Σ, ≺)?

A. ≺ is reflexive and symmetric.


B. ≺ is reflexive But not symmetric.
C. ≺ is not reflexive and not symmetric.
D. ≺ is symmetric But not reflexive.

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #43 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider a relation R with 2d attributes (d is an integer ≥ 2 ) that are named A 1, A2 , … , A2d . There is a set
F of 2d FDs on R :Ai → A1+⟨i+1) mod 2d
, for i = 1 … 2d . Here, mod is the modulo operator (remainder
after integer division, e.g., 17 mod 5 = 2 ). For example, suppose d = 2 , the attributes are A 1, A2 , A3 , A4

and F = {A → A , A → A , A → A , A → A }.
1 3 3 1 2 4 4 2

What is the number of candidate keys in R?

A. 1
B. d + 2
C. 2d
D. d 2

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #44 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following schedule:

https://gateoverflow.in/quiz/results.php 19/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

T1 T2

Read(A)

Read(B)

Read(A)

Read(B)

A = A + B

c = MIN(A, B)

d = MAX(A, B)

B = A − B

A = A − B

A = c

B = d

Write(A)

Write(A)

Write(B)

Write(B)

Which of the following describes this schedule?

A. Serializable but not view serializable


B. View serializable but not conflict serializable
C. Conflict serializable
D. None

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #45 Multiple Select Type Award: 2 Penalty: 0 Digital Logic

Consider the following circuit (assume all flip-flops are D flip flops and all are positive edge triggered):

In the following table, Show the values of the indicated signals at each time step. The clock is shown on the
top line of the table, and the initial values are shown in the first column.

Clk 0 1 0 1 0 1 0 1

A 1

B 0

C 0

D 1

Which of the following is/are correct sequence of values for each signal, starting from the first column in the
given table:

A. Signal A: 1000 0000


B. Signal B: 0110 0110
C. Signal C: 0000 0000
D. Signal D: 1110 0001

https://gateoverflow.in/quiz/results.php 20/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #46 Multiple Choice Type Award: 2 Penalty: 0.67 Digital Logic

Consider the following minterm expression for a boolean function F :

F(A, B, C) = ∑(0, 1, 7)

The minterms 3, 4 and 5 are 'do not care' terms.

What is the minimum “sum of product" expression E for the function F such that E has exactly four
minterms?

A. B ⋅ C + B ⋅ A + A ⋅ B ⋅ C
¯
¯¯¯ ¯
¯¯¯ ¯
¯¯¯ ¯
¯¯¯

B. B + C
¯
¯¯¯

C. B ⋅ A + A ⋅ C
¯
¯¯¯ ¯
¯¯¯

D. B ⋅ A + C
¯
¯¯¯ ¯
¯¯¯

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #47 Numerical Type Award: 2 Penalty: 0 CO and Architecture

Imagine we have a tiny 256-byte direct-mapped data cache with 16-byte cache lines. The cache is initially
empty. Below is a sequence of 32-bit memory load accesses. For each load identify its hit/miss status.
0x003, 0x0b4, 0x001, 0x102, 0x001, 0x2c2, 0x004, 0x2c0(Note that in the 0x hexadecimal notation, 0xabc
means 0x00000abc). The number of memory load accesses that are hit in the cache is?

Your Answer: Correct Answer: 3 Not Attempted Time taken: 00min 00sec Discuss

Q #48 Numerical Type Award: 2 Penalty: 0 CO and Architecture

In the context of the pipeline, 'Predict-not-taken' is a method of branch prediction in which the hardware
assumes that the next instruction to be executed will be the instruction following the branch instruction in
memory. This (possible) next instruction is placed in the pipe and execution begins. If after the branch is
finished executing, it is found that we really wanted to take the branch, then the (possible) next instruction
that we had been executing is thrown out by the hardware, and we begin executing the correct instruction,
the branch target. Consider two different 5-stage pipeline machines (IF ID EX MEM WB). The first
machine M resolves branches in the ID stage, uses one branch delay slot, and can fill 80% of the delay slots
with useful instructions. The second machine N resolves branches in the EX stage and uses a Predict-not-
taken scheme. Assume that the cycle times of the machines are identical. Given that 35% of the instructions
are branches, 25% of branches are taken, and that stalls are due to branches alone, what is the Speedup of
machine M over machine N (up to three decimal places)? (Speedup is the ratio of machine N running time to
machine M running time.)

Your Answer: Correct Answer: 1.098 : 1.099 Not Attempted Time taken: 00min 00sec Discuss

Q #49 Numerical Type Award: 2 Penalty: 0 Operating System

In a 32-bit machine we subdivide the virtual address into 4 segments as follows:

8-bit 4-bit 8-bit 12-bit

https://gateoverflow.in/quiz/results.php 21/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

We use a 3-level page table, such that the first 8-bit are for the first level and so on. Physical addresses are 44
bits and page table entry size at every level is 8 bytes. How much minimum amount of memory (in Bytes) is
consumed by the page table across all levels for a process that has 64 KB of memory starting at address 0?

Your Answer: Correct Answer: 4224 Not Attempted Time taken: 00min 00sec Discuss

Q #50 Multiple Choice Type Award: 2 Penalty: 0.67 Operating System

Assume the following code is compiled and run on a modern linux machine (assume any irrelevant details
have been omitted).

main() {
int a = 0;
int rc = fork();
a++;
5. if (rc == 0) {
rc = fork();
a++;
}
else {
10. a++;
}
printf("a is %d\n", a);
}

Assuming fork() never fails, What will be the largest value of “a” displayed by the program?

A. Due to race conditions, “a” may have different values on different runs of the program.
B. 2
C. 3
D. 5

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #51 Multiple Select Type Award: 2 Penalty: 0 Computer Networks

Consider the following network, which contains a client A, two routers B and C, and a webserver D that
listens on port 80 and does not listen on any other port:

The links A B, B C and C D have a maximum transmission unit (MTU) of 9000 bytes, 1500 bytes, and
1480 bytes respectively.

For every packet, we are using TCP (with no options) and IPv4 (with the DF flag set on every packet, and
no options). The TCP payload contains data that is within the receiver window, and not previously
acknowledged. All the checksums are valid, and no data corruption occurs.

There are 4 packets sent from A to D with following parameters -

1 st packet: (TCP) payload length of 1490, a (TTL) of 149.


2 nd packet: (TCP) payload length of 222, a (TTL) of 2.
3 rd packet: (TCP) payload length of 100, a (TTL) of 80.
4th packet: (TCP) payload length of 80, a (TTL) of 3.

Which of the following is/are the CORRECT option?

https://gateoverflow.in/quiz/results.php 22/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

A. For the first packet, B will send an ICMP error message to A.


B. For the second packet, C will send an ICMP error message to A.
C. For the third packet, D will send ACK to A.
D. For the fourth packet, Dwill send an ICMP error message to A.

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss

Q #52 Multiple Select Type Award: 2 Penalty: 0 Computer Networks

A sender S and receiver R are connected over a network that has k links that can each lose packets. Link i
has a packet loss rate of p in one direction (on the path from S to R) and q in the other (on the path from R
i i

to S). Assume that each packet on a link is received or lost independent of other packets, and that each
packet's loss probability is the same as any other's (i.e., the random process causing packet losses is
independent and identically distributed).

Suppose that the probability that a data packet does not reach R when sent by S is p and the probability that
an ACK packet sent by R does not reach S is q. Which of the following are CORRECT?

A. p = p × p × … × p
1 2 k

B. q = 1 − (1 − q ) (1 − q
1 2) … (1 − qk )

C. Suppose S and R use a stop-and-wait protocol to communicate then the expected number of
transmissions of a packet before S can send the next packet in sequence = 1/p

D. Suppose S and R use a stop-and-wait protocol to communicate then the expected number of
transmissions of a packet before S can send the next packet in sequence = 1/pq

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #53 Multiple Select Type Award: 2 Penalty: 0 Computer Networks

Consider the arrangement of hosts H and routers R in the following figure. All links are full-duplex, and
bandwidth given in diagram is on both ways.

Let the bandwidths of all links (in both directions) at first level is 8 MBps, at second level is 4 MBps, and at
third level is 2 MBps.

A router is congested if incoming packet rate is higher than outgoing packet rate. For example if H5, H6 and
H7 all of these wants to send packets to H8 then R7 will get congested because incoming rate will be
6 MBps and outgoing rate is 2 MBps.

Which of the following router(s) will never get congested for any traffic pattern?

A. R1
B. R2
C. R3
D. R4

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

https://gateoverflow.in/quiz/results.php 23/24
2/6/25, 6:01 PM gateoverflow.in/quiz/results.php

Q #54 Multiple Select Type Award: 2 Penalty: 0 Operating System

GoClasses professor has designed an assignment with three semaphore-synchronized processes running
simultaneously in an interleaved fashion on a single CPU.

P1:

wait(s1);
wait(s2);
print("1");
signal(s2);
5. signal(s1);

P2:

wait(s2);
wait(s3);
print("2");
signal(s3);
5. signal(s2);

P3:

wait(s2)
wait(s3)
wait(s1)
print("3")
5. signal(s1)
signal(s3)
signal(s2)

Unfortunately, the professor forgot to assign initial values to semaphores s1, s2, and s3.

For which values of s1, s2, and s3 will there be NO deadlock possible?

A. s1 = 1, s2 = 1, s3 = 1
B. s1 = 2, s2 = 1, s3 = 1
C. s1 = 1, s2 = 2, s3 = 1
D. s1 = 1, s2 = 1, s3 = 2

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #55 Multiple Choice Type Award: 2 Penalty: 0.67 Calculus

Let n be the number of real roots of function f (x) = x


3
+ 3x + 1 . What is the value of n?

A. 0
B. 1
C. 2
D. 3

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


https://gateoverflow.in/quiz/results.php 24/24

You might also like