0% found this document useful (0 votes)
5 views25 pages

FLT 4

The document provides a summary of results from a mock GATE exam, indicating that no questions were attempted, resulting in zero marks. It includes details on the total number of questions, marks, and exam duration, as well as a breakdown of various questions with their types, correct answers, and penalties. The document also features specific questions from different sections such as Analytical Aptitude, Technical, and Mathematical Logic.

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)
5 views25 pages

FLT 4

The document provides a summary of results from a mock GATE exam, indicating that no questions were attempted, resulting in zero marks. It includes details on the total number of questions, marks, and exam duration, as well as a breakdown of various questions with their types, correct answers, and penalties. The document also features specific questions from different sections such as Analytical Aptitude, Technical, and Mathematical Logic.

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/ 25

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

php

Summary in Graph

Exam Summary (GO Classes CS Test Series 2025 | MOCK


GATE | Test 4)

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 Analytical Aptitude

The last Sunday of March 2006 fell on which date?


Statements:

I. The first Sunday of that month fell on 5th.


II. The last day of that month was Friday.

From which of the above statement(s), Answer of the above question can be drawn?

A. I alone is sufficient
B. II alone is sufficient
C. Either I or II is sufficient
D. Neither I nor II is sufficient

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

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

In a certain code ‘SEQUENCE' is coded as ‘FDOFVRFT’. How is ‘CHILDREN' coded in that code?

A. OFESJMID
https://gateoverflow.in/quiz/results.php 1/25
2/6/25, 6:03 PM gateoverflow.in/quiz/results.php

B. OFSEMJID
C. OFSEJIMD
D. OFSEJMID

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

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

Choose the correct mirror image of the given figure (X) among the four alternatives.

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

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

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

If A is the father of B who is a male, C is the mother of A, D is the brother of A, E is the uncle of D. And F
is the sister of G, G is the paternal grandfather of B. E is not the brother of G and H is the sister-in-law of D
. Then how is H related to G?

A. Daughter
B. Grand-daughter
C. Daughter-in-law
D. Niece

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

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

Find the Error in the following sentence

Bharatnatyam will also(P)/ be featured in the two-week(Q)/ World Music Festival(R)/ No Error (S)

A. P
B. R
C. Q
D. S

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

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

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

In a class of 36 students, the number of boys is twice the number of girls. Seema, who is a girl, is ranked 19th
in the class test and there are 13 boys ahead of her. How many girls are there in the class after Seema? (No
two students share the same rank)

A. 5
B. 6
C. 11
D. 12

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

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

Statements:

All the bottles are boxes.


All the boxes are bags.
Some bags are trays.

Conclusions:

1. Some bottles are trays.


2. Some trays are boxes.
3. All the bottles are bags.
4. Some trays are bags.

Which of the above conclusion(s) follows from the given statements?

A. Only (3) and (4)


B. Only (1) and (2)
C. Only (2) and (3)
D. Only (1) and (4)

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

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

A rhombus has one of its diagonal 65% of the other (d1 = 0.65 d2) . A square is drawn using d2 as a side.
What will be the ratio of the area of the rhombus to that of the square?

A. 13 : 40

B. 12 : 13

C. 40 : 13

D. 15 : 46

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

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

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

2
(3a −5a−3)
If a = √17 + 4 find the value of (4a2 −3a−4)
?

A. 19

29

B. 131

200

C.
15

16

D. 29

19

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

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

The average salary of the teachers of a school is Rs. 3000. When the salary of two more teachers is included,
the average salary reduces by Rs. 100, and the total salary increases by Rs. 4000. Find the number of teachers
(before inclusion).

A. 16
B. 17
C. 18
D. 19

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

Technical

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

A router with the following forwarding table receives a packet with destination IP address 128.195.3.10.
Which will be the outgoing interface of the packet?

Network ID and Mask Interface

128.195.0.0/8 eth2

128.195.0.0/16 eth0

128.195.0.0/24 eth1

0.0.0.0/0 eth3

A. eth0
B. eth1
C. eth2
D. eth3

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

Q #2 Numerical Type Award: 1 Penalty: 0 Compiler Design

Consider the following three-address code fragment:

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

1. L1: a = b + c
2. L2: b = b * 2
3. if (b < d) goto L3
4. f = b - a
5. 5. if (f < d) goto L1
6. L3: g = 7 + f
7. a = g - 6
8. if (a > d) goto L2
9. e = g
10. 10. f = e * a

What is the number of basic blocks in the above code fragment?

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

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Operating System

Consider three processes P1, P2, and P3 with respective arrival times of 0 ms, 10 ms, and 20 ms and
respective processing times of 30 ms, 15 ms, and 30 ms. The three processes are preemptively scheduled on
a single-CPU system using the shortest-remaining-processing-time-first scheduling policy. Which of the
following shows the order in which the processes complete, from first to last?

A. P1 P2 P3

B. P1 P3 P2

C. P2 P1 P3

D. P2 P3 P1

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

Q #4 Multiple Select Type Award: 1 Penalty: 0 Operating System

Consider the following different possible pseudocode taken from two processes, where A, B are blocks of
code, and S is a semaphore initialized to 0.

Which of the following sequence ensures that A always runs BEFORE B?

A. Process 1: Process 2:
A; up(S);
down(S); B;

B. Process 1: Process 2:
A; down(S);
up(S); B;

C. Process 1: Process 2:
down(S); down(S);
A; B;
up(S); up(S);

D. Process 1: Process 2:
up(S); down(S);
A; B;

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

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

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

Consider the following possible data structures for a set of n distinct integers.

I. A min-heap
II. An array of length n sorted in increasing order
III. A balanced binary search tree

For which of these data structures is the number of steps needed to find and remove the 7th largest element
O(log n) in the worst case?

A. II only
B. I and II
C. I and III
D. II and III

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

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

Consider the following function -

int f (int n){


if (n==0) return 0;
else if (n==1) return 1;
else {
5. int val = 4*f (n-1);
val = val - 3*f (n-2);
val += 2;
return val;
}
10. }

Let f (n) be the value returned by the function f when given input n > 1. And let T(n) be the time
complexity of the function for input size n.

Consider below statements for n > 1 -

S1 : f (n) = 4f (n − 1) − 3f (n − 2) + 2

S2 : T(n) = 4T(n − 1) + 3T(n − 2) + θ(1)

Which of the following is CORRECT?

A. S1 is correct but S2 is incorrect


B. S1 is incorrect but S2 is correct
C. Both are correct
D. Both are incorrect

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

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

Consider the following pseudocode of a recursive sorting algorithm which takes an array L of n integers:

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

Sillysort(L){
if(len(L) <= 1){
return L;
} else{
5. 1. Sillysort the first third of L;
2. Heapsort the remaining two thirds of L;
3. Merge the two sorted lists together (using
standard merge procedure of merge sort);
}
10. }

What is the time complexity of Sillysort for an array of n integers?

A. θ(n 2
)

B. θ(n log n)
C. θ(n 2
log n)

D. θ(n 3
log n)

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

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

Suppose that P(x, y) means “x is a parent of y” and M(x) means “x is male". If F(v, w) equals

M(v) ∧ ∃x∃y(P(x, y) ∧ P(x, v) ∧ (y ≠ v) ∧ P(y, w)),

what is the meaning of the expression F(v, w)?

A. v is a brother of w.
B. v is a nephew of w.
C. v is an uncle of w.
D. v is a grandfather of w.

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

Q #9 Multiple Select Type Award: 1 Penalty: 0 Mathematical Logic

Suppose that S and T are sets. Which of the following first-order logic statements are translations of the
statement “S is not a subset of T”?

A. ∀x. (x ∈ S → x ∉ T)

B. ∀x. (x ∈ S ∧ x ∉ T)

C. ∃x. (x ∈ S → x ∉ T)

D. ∃x. (x ∈ S ∧ x ∉ T)

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

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

The output Y in the circuit below is always “1" when

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

A. two or more of the inputs P, Q, R are “0”


B. two or more of the inputs P, Q, R are “1”
C. any odd number of the inputs P, Q, R is “0”
D. any odd number of the inputs P, Q, R is “1"

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

Q #11 Multiple Select Type Award: 1 Penalty: 0 Digital Logic

The circuit below has a 2-to-4 decoder with input AB and active high outputs connected to two 2-to-1
multiplexers, followed by an exclusive OR (XOR) gate.

Which of the following input combinations makes the output F(A, B, C, D) = 1?

A. A = 1, B = 1, C = 0, D = 0
B. A = 0, B = 1, C = 1, D = 0
C. A = 0, B = 0, C = 0, D = 0
D. A = 0, B = 0, C = 1, D = 1

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

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

In a microprocessor with a 16 bit address bus, the most significant address lines A15 to A12 are used to
select a 4096 word memory unit, while lines A0 to A11 are used to address a particular word in the memory
unit. If the 3 least significant lines of the address bus A0 to A2 are short-circuited to ground, the addressable
number of words within a particular memory unit is ________.

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

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

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

In a pipelined RISC computer where all arithmetic instructions have the same CPI (cycles per instruction),
which of the following actions would improve the execution time of a typical program?

I. Increasing the clock cycle rate


II. Disallowing any forwarding in the pipeline
III. Doubling the sizes of the instruction cache and the data cache without changing the clock cycle time

A. I only
B. I, III only
C. III only
D. None

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

Q #14 Multiple Choice Type Award: 1 Penalty: 0.33 Programming in C

Given the following variable declarations:

char *words[] = {"hello", "world"};


void *v = words;

Which of the following prints out hello world?

A. printf("%c %c\n", *v, *(v + 1));

B. printf("%s %s\n", *(char **)v, *((char **)v + 1));

C. printf("%s %s\n", *(char *)v, *((char *)v + 1));

D. printf("%s %s\n", **v, **(v + 1));

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

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

Consider the following function -

int abc(void) {
int a = 3;
static int b = 1;
if(++a > ++b)
5. return a++;
else return ++b;
}

Suppose main() calls the function three times. What value is returned to main() in the third call to abc()?

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

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

Let G be any simple undirected (no self-loops or parallel edges) with positive and distinct edge weights. Let s

and t be two vertices in G .

Which of the following is/are TRUE?

A. Any shortest path from s to t in G must include the edge of minimum weight.

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

B. If the weights of all edges in G are increased by 2025, then any MST in G is an MST in the modified
edge-weighted graph.
C. The shortest path from s to t in G is unique.
D. If the weights of all edges leaving s are increased by 2025, then any shortest path from s to t in G is a
shortest path in the modified edge-weighted graph.

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

Q #17 Multiple Choice Type Award: 1 Penalty: 0.33 Operating System

The lookup page table shown below is for a job in a page virtual storage system

Virtual Page Actual Page

0 3

1 −

2 4

3 0

with a page size of 1024 locations. Each virtual address is in the form [p, d] where p and d are the page
number and the displacement in that page, respectively. A virtual address of [0, 514] maps to an actual
address of

A. 514
B. 1024
C. 3586
D. 4514

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

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

Consider a B+ tree defined on a database relation. The B+ tree's leaves hold RIDs(record pointers), not
the actual tuples. The size of the index key values is such that N (key, pointer) or (key, RID) pairs can be
stored in each block of the index.

What is the maximum relation size (i.e., the maximum number of tuples) that can be indexed using a B+ tree
of height 3? (Height of a single node B+ tree is considered as 1)

A. θ(N)
B. θ(N 2
)

C. θ(N 3
)

D. θ(N 4
)

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

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

In relational algebra, R ⋈(condition) S can be rewritten as:

A. R X S

B. R X(condition) S

C. σ (condition)
R X σ(condition) S

D. σ (condition)
(R X S)

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

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

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

Suppose we roll two distinct tetrahedral (four-sided) dice. Each dice contain the numbers from 1 to 4. Let X
be the number of dice that show an odd number, Y the number that show an even number. So both X and
Y only take on the values 0, 1, 2 .

What will be the probability that Y > X i.e. P(Y > X)?

A. 1/2
B. 3/4
C. 1/4
D. 2/3

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

Q #21 Multiple Choice Type Award: 1 Penalty: 0.33 Calculus

Evaluate the limit


2
x − 3x + 2
lim
2
x→2 2x − 8

A. 1/4
B. 1/2
C. 1/8
D. 1/3

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

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

Of the following, which gives the best upper bound for the value of f (N) where f is a solution to the
recurrence

f (2N + 1) = f (2N) = f (N) + log N for N ≥ 1,

with f (1) = 0?

A. O(log N)
B. O(N log N)
C. O ((log N) 2
)

D. O(N)

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

Q #23 Multiple Choice Type Award: 1 Penalty: 0.33 Set Theory & Algebra

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

Let A be a finite nonempty set with cardinality n. The number of subsets S ⊆ A having odd cardinality is

A. not determinable except in terms of whether n is even or odd


n

B. 2 2

C. 2 n−1

D. 2 n

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

Q #24 Numerical Type Award: 1 Penalty: 0 Computer Networks

Consider sending a 3000 byte datagram (including IP header of 20 bytes) into a link that has an MTU of 500
bytes. Let X be the number of fragments generated and Y be offset on the last fragment then what will be
the value of X + Y?

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

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

Consider the following two transactions:

T1 : R(A), W(A), R(B), W(B), Commit

T2 : R(B), R(C), W(C), W(B), Commit

Consider the following interleaved schedule of the two transactions:

RT1 (A), RT2 (B), RT2 (C), WT1 (A), RT1 (B), WT1 (B), WT2 (C), WT2 (B) Commit T1 , Commit T2

Which of the following is true for the above schedule?

A. The schedule is conflict serializable & recoverable.


B. The schedule is conflict serializable but not recoverable.
C. The schedule is not conflict serializable but recoverable.
D. The schedule is neither conflict serializable nor recoverable.

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

Q #26 Numerical Type Award: 2 Penalty: 0 Computer Networks

A node x is part of a network running distance vector routing protocol. x has three entries in its routing table:

Destination Cost Next Hop

w 4 w

y α z

z β w

α and β are two unknown values (unknown to you, but not to x). Assume that the distance vector routing
protocol has converged and the minimum cost path from x to every other node has been found. The given
table contains the costs after the convergence of the algorithm. We denote c(x, y) as the direct link cost
between x and y, and d x (y) as the cost of the minimum cost path from x to y. The link cost is a positive
integer. Also, assume link costs are symmetric in both directions. We know that c(x, w) is 4, and c(x, z) is 10.
What is the maximum possible value for d w (z)?

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

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

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

Consider the following grammar for generating binary fractions.

F → 0. B {F.val = B.val}

B0 → 0B1 {X}

B0 → 1B1 {Y}

B → 0 {B.val = 0}

B → 1 {B.val = 1/2}

What should be the missing semantic actions X and Y to calculate the decimal value of an input string?

Recall that the numeric value of a binary fraction 0.b is calculated as ∑ . Each non-terminal
n −i
1 b2 … bn
i=1
bi 2

has a synthesized attribute val that is used to store its value. The final value should be returned in F.val.

A. X is B 0 ⋅ val = B1 ⋅ val/2

B. Y is B 0 ⋅ val = B1 ⋅ val/2 + 1/2

C. X is B 0 ⋅ val = B1 ⋅ val/4

D. Y is B 0 ⋅ val = B1 ⋅ val/4 + 1/2

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

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

A complete binary min-heap is made by including each integer in [1, 1023] exactly once. The level of a node
in the heap is the length of the path from the root of the heap to that node. Thus, the root is at level 0. The
maximum number that could appear at level 1 in such a heap will be?

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

Q #29 Multiple Choice Type Award: 2 Penalty: 0.67 Programming in C

Consider the following recursive program-

int mysteryX(int *a, int i, int j, int P) {


if (i >= j) {
return i;
} else if (a[i] < P) {
5. return mysteryX(a, i + 1, j, P);
} else if (a[j] > P) {
return mysteryX(a, i, j - 1, P);
} else {
int temp = a[i];
10. a[i] = a[j];
a[j] = temp;
return mysteryX(a, i + 1, j - 1, P);
}
}
15. int main() {
int a[] = {9,7,5,2,6,8,4,1,3};
mysteryX(a,0,8,3);
for (int i=0; i<9; i++)
printf("%d ",a[i]);
20. return 0;
}

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

What will be the output of the program?

A. 3 1 2 5 6 8 4 7 9

B. 1 2 5 7 6 8 4 9 3

C. 1 2 3 5 6 8 4 7 9

D. None of these

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

Q #30 Multiple Choice Type Award: 2 Penalty: 0.67 DS

Consider the following C-like pseudo-code-

swapK(Queue q, int k) {
if (k > q.size())
print("k cannot be more than queue size");
for (int i = 0; i < k / 2; i++) {
5. int elem1 = q.dequeue();
int elem2 = q.dequeue();
q.enqueue(elem2);
q.enqueue(elem1);
}
10.
for (int i = 0; i < q.size() - k; i++) {
q.enqueue(q.dequeue());
}

15. }

enqueue, dequeue and size are standard queue operations.

Let a queue Q contain elements 1, 2, 3, 4, 5, 6, 7, 8 in that order where 1 is on front. What will be the output
of swapK(Q,6)?

(In all the options leftmost number is front of the queue and the rightmost is rear of the queue).

A. 2, 1, 4, 3, 5, 6, 7, 8
B. 2, 1, 4, 3, 6, 5, 7, 8
C. 7, 8, 2, 1, 4, 3, 6, 5
D. 2, 1, 4, 3, 6, 5, 8, 7

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

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

The following function operates on a linked list of Node objects, which is represented by a pointer called
head that points to the first node in the list. The function is recursive in nature.

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

Node* mystryrecur(Node* head, int x)


{
if (head == NULL)
return NULL;
5.
if (head → data == x)
{
Node* tmp = head → next;
free(head);
10. return mystryrecur(tmp, x);;
}
else
{
head → next = mystryrecur(head → next, x);
15. return head;
}
}

Let the linked list be following and head points to the first node of the linked list.

0 → 4 → 2 → 4 → 6 → NULL

What will be the result of the linked list after executing the following line and accessing it through the “head"
pointer?

head = mystryrecur( head, 2);

A. 0 → 4 → 6 → NULL
B. 0 → 4 → 4 → 6 → NULL
C. 0 → 6 → NULL
D. 10 → NULL

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

Q #32 Numerical Type Award: 2 Penalty: 0 Linear Algebra

Let the matrix A be given by

1 3 −2 2
⎡ ⎤

⎢ 0 1 1 −5 ⎥
⎢ ⎥
⎢ 1 2 −3 7⎥
⎣ ⎦
−2 −8 2 −1

What will be the number of linearly independent solutions of the homogeneous system of linear equation
Ax = 0?

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

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

Each of the figures below represents a partial spanning tree with bold edges. Determine whether it could
possibly be obtained from (a prematurely stopped) Prim’s algorithm, (a prematurely stopped) Kruskal’s
algorithm, Both or Neither.
Prim's algorithm starts with vertex V in all cases.

T1 :

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

T2 :

T3 :

T4 :

A. T1 - Kruskal's only, T2- Prims only, T3- Neither, T4 - Both


B. T1 - Kruskal's only, T2- Prims only, T3 - Kruskal's only, T4 - Kruskal's only
C. T1 - Kruskal's only, T2- Neither, T3-Neither, T4 - Both
D. T1 - Kruskal's only, T2- Neither, T3- Kruskal's only, T4 - Prims only

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

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

A couple, Romeo and Juliet, share a bowl of frozen yogurt (We assume that the bowl is magical and has an
infinite supply of frozen yogurt).

Only one person can eat from the bowl at a time, and it doesn't matter who eats first.

Let the initialization of semaphores be as follows-

semaphore s = 1;
semaphore romeo = 0;
semaphore juliet = 0;

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

Consider two possible solutions that use above semaphores to model the behavior of the couple.

Solution 1 :

Romeo: Juliet:
while (true) { while (true) {
down(s) down(s)
eat() eat()
5. up(juliet) up(romeo)
down(romeo) down(juliet)
up(s) up(s)
} }

Solution 2 :

Romeo: Juliet:
while (true) { while (true) {
down(s) down(s)
eat() eat()
5. up(s) up(s)
up(juliet) up(romeo)
down(romeo) down(juliet)
} }

Which of the following is true about these solutions?

A. Solution 1 may lead to deadlock but not solution 2


B. Solution 2 may lead to deadlock but not solution 1
C. Both solutions may lead to deadlock
D. None of the solutions will ever lead to deadlock

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

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

Suppose that we have the following resources: A, B, C and threads T1, T2, T3, T4. The total number of
each resource is:

Total
A B C
12 9 12
Further, assume that the processes have the following maximum requirements and current allocations:

Thread
Current Allocation Maximum
ID
A B C A B C

T1 2 1 3 4 9 4
T2 1 2 3 5 3 3
T3 5 4 3 6 4 3
T4 2 1 2 4 8 2
How many safe sequences are possible for the above state of the system? (If you find the system in an unsafe
state then please answer 0).

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

Q #36 Multiple Select Type Award: 2 Penalty: 0 Probability

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

Consider a coin with probability p to be heads. We toss a coin until we get a head. Which of the following
is/are true ?

A. The probability that the first heads will appear on second or fourth toss is p(1 − p) + p(1 − p) 3

B. The probability that the first heads will appear on the even-numbered tosses is
1−p

2−p

C. Expected Number of tosses to get first head is 1/p


D. The probability that the first heads will appear on the odd-numbered tosses is 1/(2 − p)

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

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

Consider the following (already augmented) grammars for the language a +


:

Grammar G1: S → A

A → Aa ∣ a

and

Grammar G2: S → A

A → aA ∣ a

Both of these grammars are SLR(1).

Which of the following is TRUE when we run both SLR(1) parsers on the string a n
?

A. SLR(1) parser for the grammar G1 will take Θ(n) space in its parsing stack and SLR(1) parser for the
grammar G2 will take Θ(1) space in its parsing stack
B. SLR(1) parser for the grammar G1 will take Θ(1) space in its parsing stack and SLR(1) parser for the
grammar G2 will take Θ(n) space in its parsing stack
C. Both of the grammar will take Θ(1) stack space while parsing a using their respective SLR(1) parsers.
n

D. Both of the grammar will take Θ(n) stack space while parsing a using their respective SLR(1) parsers
n

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

Q #38 Numerical Type Award: 2 Penalty: 0 Compiler Design

Consider the following grammar and associated semantic actions.

S → ABCD {x = 11 ∗ x + 1; }

D → d {x = 7 ∗ x + 1; }

C → cc {x = 5 ∗ x + 1; }

B → Bb {x = 3 ∗ x + 1; }

B → b {x = x + 1; }

A → gBa {x = 2 ∗ x + 1; }

The variable x is global-i.e., all semantic actions update the same x. Assume x is initialized before parsing to
0. What is the final value of x in a bottom-up parse of the following input string: gbbabbccd

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

Q #39 Multiple Choice Type Award: 2 Penalty: 0.67 Combinatory

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

Consider a brute-force password-guessing attack that can submit authentication requests at a rate of one
every millisecond. Assume that a password consists of 1-6 characters from a 10-symbol alphabet. In the
average case, approximately how many seconds would it take to determine the password using this type of
attack?

A. 1, 111
B. 500
C. 555
D. 1, 000

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

Q #40 Multiple Select Type Award: 2 Penalty: 0 Set Theory & Algebra

A binary relation R over a set A is called surjective if the following statement is true about R :

∀b ∈ A. ∃a ∈ A. aRb

Which of the following statements is(are) true?

A. A binary relation R over a set A is an equivalence relation if R is surjective, symmetric, and transitive.
B. If a binary relation R over a set A is an equivalence relation then R is surjective.
C. If a binary relation R over a set A is reflexive then R is surjective.
D. If a binary relation R over a set A is surjective then R is reflexive.

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

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

Consider a single-issue in-order 5-stage pipeline - IF (Instruction Fetch), ID (Instruction Decode and register
read), EX (Execute), MEM (Memory), and WB (Write Back). All register reads take place in the second phase of
a clock cycle and all register writes occur in the first phase and there is no operand forwarding in use.
Consider the execution of the following instruction sequence:

I1 : lw r0, 0(r5) / r0 ← M[0 + r5] */


I2 : addi r5, r5, 4 / r5 ← 4 + r5 */


I3 : add r0, r3, r0 / r0 ← r3 + r0 */

I4 : sw r0, 0(r5) / M[0 + r5] ← r0 */


I5 : xor r6, r2, r5 / r6 ← r2 + r5 */

I6 : add r2, r6, r2 / ∗ r2 ← r6 + r2 */

Identify all the data hazards in the above sequence of instructions. If the number of RAW (read after write)
hazards is denoted by A, WAR (write after read) hazards by B and WAW (write after write) hazards by C, then
3A + 2B + C =

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

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

X = X1 X0 and Y = Y 1 Y0 are 2-bit binary numbers. The Boolean function S that satisfies the condition
“X > Y if and only if S = 1”, in its minimized form, is

A. X 1 Y1 + X0 Y0

B. X
¯
¯¯¯ ¯
¯¯¯ ¯
¯¯¯ ¯
¯¯¯
1 Y1 + X0 Y 0 Y 1 + X0 Y 0 X1

C. X
¯
¯¯¯ ¯
¯¯¯
1 Y 1 X0 Y 0

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

D. X
¯
¯¯¯ ¯
¯¯¯ ¯
¯¯¯
1 Y1 + X0 Y 0 Y1 + X0 Y 0 X 1

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

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

Find the Boolean functions that need to be applied to the inputs of the circuit on the right in order to obtain
the same function in terms of x, y, and z at the output of the circuit shown on the left.

Which of the following is the correct sequence of boolean functions applied at the inputs of the circuit on the
right, in the input line order 0 to 3?

A. 0, x, 1, x ¯
¯¯

B. 1, x, 0, x
¯
¯¯

C. 0, x, 1, x
¯
¯¯

D. 0, x, x, x
¯
¯¯ ¯
¯¯

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

Q #44 Multiple Choice Type Award: 2 Penalty: 0.67 Graph Theory

For which of the following does there exist a simple undirected graph G = (V, E) satisfying the specified
conditions?

I. G has 3 components, 20 vertices and 16 edges.


II. G has 12 vertices, 28 edges and the degree of each vertex is either 3 or 6.

A. Only I
B. Only II
C. Both
D. None

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

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

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

Let M be a single-tape, deterministic Turing machine with tape alphabet {blank, 0, 1}, and let C denote the
(possibly infinite) computation of M starting with a blank tape. The input to each problem below is M,
together with a positive integer n. Which of the following problems is (are) decidable?

I. The computation C lasts for at least n steps.


II. The computation C lasts for at least n steps, and M prints a 1 at some point after the nth step.
III. The computation C lasts for at least n steps, and M prints a 1 at some point before the nth step.

A. None
B. I only
C. I & III only
D. All

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

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

Which of the following regular expressions do not denote a subset of the language recognized by the
automaton above?

A. 0 ∗
(11) 0
∗ ∗

B. 0
∗ ∗ ∗
1(10 1) 1

C. 0 ∗ ∗ ∗ ∗
1(10 1) 10

D. 0
∗ ∗ ∗
1 (10 1) 0(100)

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

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

A path in a directed graph is a series of one or more nodes v 1, v2 , … , vn such that each pair of adjacent
nodes v i, vj in the path is connected by an edge v i → vj .

Consider the following graph G :

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

Let Σ = {A, B, C} . We can represent a path in G as a nonempty string where the letters spell out the path in
the graph. For example, the path A, B, C, C would be represented by the string ABCC.

Let L = {w ∈ Σ

∣ w represents a path in G} , where G is the graph given above. For example:

A ∈ L ACC ∉ L

ABC ∈ L ε ∉ L

BCC ∈ L BBA ∉ L

CCABA ∈ L ABBC ∉ L

Which of the following is true for language L?

A. L is a regular language.
B. L is a deterministic context-free language(DCFL) but not regular.
C. L is context-free language(CFL) but not DCFL.
D. L is not CFL.

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

Q #48 Numerical Type Award: 2 Penalty: 0 Theory of Computation

Suppose that you really, really don't like the string abba and want to build a language of everything except
that string. Let Σ = {a, b} and consider the language NOT abba defined as follows:

NOTabba = {w ∈ Σ ∣ w ≠ abba }

For example, ε ∈ NOTabba and abbabb ∈ NOTabba , but (unsurprisingly) abba ∉ NOTabba . What is the
number of states in the minimal DFA(deterministic finite automaton) for L?

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

Q #49 Numerical Type Award: 2 Penalty: 0 Digital Logic

Two T-flip flops are interconnected as shown in the figure. The present state of the flip flops are:
A = 1, B = 1 . The input x is given as 1, 0, 1 in the next three clock cycles. The decimal equivalent of
(ABy)2 with A being the MSB and y being the LSB, after the 3 clock cycle is __________.
rd

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

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

Q #50 Multiple Choice Type Award: 2 Penalty: 0.67 Programming in C

Given the following code fragment, what value is printed by main()?

int fiddle (int a) {


if (a == 1 || a == 2)
return a;
if (a > 0)
5. return fiddle(a-2);
if (a <= 0)
return fiddle(a+2);
}

10. foodle (int val) {


if (val < 0)
return fiddle(val + 5);
else
return fiddle(val - 5);
15. }

int main(void)
{
printf("%d", foodle(-9));
20. return 0;
}

A. 2
B. −9
C. 1
D. the program will loop forever and never display anything 9.

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

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

Let Σ be the input alphabet, a ∈ Σ , and w, x ∈ Σ .ϵ



is the empty string. Recall that the ' w ∙ x ' or ' wx '
denotes the concatenation of two strings w, x, and |w| is the length of string w.

Consider the following pair of mutually recursive functions:

ε if w = ε ε if w = ε
evens(w) := { odds(w) := {
odds(x) if w = ax a ⋅ evens(x) if w = ax

Which of the following identities hold for all strings w and x?

A. evens(w ∙ x) = evens(w) ∙ evens(x) if |w| is even.


B. evens (w ∙ x) = odds(w) ∙ odds(x) if |w| is odd.
C. odds (w ∙ x) = odds(w) ∙ evens(x) if |w| is even.
D. odds(w ∙ x) = odds(w) ∙ evens(x) if |w| is odd.

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

Q #52 Multiple Select Type Award: 2 Penalty: 0 Databases

In a relational database relation, we say a non-empty set of attributes X is closed (with respect to a given set
of functional dependencies FD) if X where X is the closure of X). Consider a relation with schema
+ +
= X (

R{A, B, C, D) and an unknown set of FD's. If we are told which sets of attributes are closed, we can discover
the FD's.

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

Assume that the only closed sets are {A, B}, {C}, {A, B, C, D}.

Which of the following is/are true for R?

A. The number of candidate keys is 2.


B. The number of non-prime attributes is 2.
C. R is in 2NF.
D. The number of non-trivial FDs of the form X → Y where X, Y both are single attributes, is 5.

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

Q #53 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider the following database table R(X, Y) :

x y

1 2

1 2

2 3

3 4

3 4

4 1

4 1

4 1

4 2

Compute the result of the following SQL query:

SELECT a1.x, a2.y, COUNT(*)


FROM R a1, R a2
WHERE a1.y = a2.x
GROUP BY a1.x, a2.y

Which of the following is(are) in the result?

A. (1, 3, 2)
B. (4, 2, 6)
C. (4, 3, 1)
D. (4, 4, 0)

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

Q #54 Multiple Choice Type Award: 2 Penalty: 0.67 Computer Networks

Suppose that it takes 1 unit of time to transmit a frame (of fixed size) on a communication link. The link layer
uses Go-Back- N protocol with a window size of N = 10 frames. Each frame causes an ack or a nak to be
generated by the receiver, and ack/nak transmission times are negligible. Further, the round trip time
(representing here the time when the first bit of the segment is transmitted till its acknowledgment is
received) on the link is equal to N units.

Assume that errors occur deterministically, once every ten frame transmissions from sender to receiver and
that there are never any errors on the acknowledgments.

Which of the following is CORRECT?

A. The sender will be able to send the 10 th


frame on the first attempt.
B. The sender will be able to send the 10 th
frame in the first retransmission (second attempt).
C. The sender will be able to send the 10 th
frame in the second retransmission (third attempt).
https://gateoverflow.in/quiz/results.php 24/25
2/6/25, 6:03 PM gateoverflow.in/quiz/results.php

D. The sender will never be able to send the 10 frame successfully.


th

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

Q #55 Multiple Choice Type Award: 2 Penalty: 0.67 CO and Architecture

Consider the following code that accesses a two-dimensional array (of size 64 × 64 ints). Assume we are
using a direct-mapped, 1 KB cache with 16 B block size.
Consider Sizeof(int) = 4.

for (int i = 0; i < 64; i++)


for (int j = 0; j < 64; j++)
array[i][j] = 0; // assume &array = 0x000000

What is the miss rate of the execution of the entire loop?

A. 25%
B. 50%
C. 100%
D. 75%

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

Copyright & Stuff

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

You might also like