CS and IT GATE 2024 SET-1 Questions with Answer

Ques 27 Computer Science


Consider a network path P-Q-R between nodes P and R via router Q. Node P sends a file of size 106 bytes to R via this path by splitting the file into chunks of 103 bytes each. Node P sends these chunks one after the other without any wait time between the successive chunk transmissions.
Assume that the size of extra headers added to these chunks is negligible, and that the chunk size is less than the MTU. Each of the links P-Q and Q-R has a bandwidth of 106 bits/sec, and negligible propagation latency. Router Q immediately transmits every packet it receives from P to R, with negligible processing and queueing delays. Router Q can simultaneously receive on link P-Q and transmit on link Q-R. Assume P starts transmitting the chunks at time t = 0.
Which one of the following options gives the time (in seconds, rounded 3 to 3 decimal places) at which R receives all the chunks of the file?

A

8.000

B

8.008

C

8.016

D

16.000



Ques 28 Computer Science


Consider the following syntax-directed definition (SDD).

Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val)?

A

45

B

50

C

55

D

60



Ques 29 Computer Science


Consider the following grammar G, with S as the start symbol. The grammar G has three incomplete productions denoted by (1), (2), and (3).

The set of terminals is {a,b,c,d,f} The FIRST and FOLLOW sets of the different non-terminals are as follows.
Which one of the following options CORRECTLY fills incomplete productions?

A

(1) S → Rf (2) T → ϵ (3) R → cTR

B

(1) S → fR (2) T → ϵ R → cTR

C

(1) S → fR T → cT

D

(1) S → Rf (2) T → cT (3) R → cR



Ques 30 Computer Science


Consider the following pseudo-code.

Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively?

A

4 and 4

B

5 and 5

C

6 and 6

D

7 and 6



Ques 31 Computer Science


Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a=b=1 Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption.

Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?

A

(a=4, b=4); (a=3, b=3); a=4, b=3)

B

(a=3, b=4); a=4, b=3); (a=3, b=3)

C

(a=4, b=4); (a=4, b=3); (a=3, b=4)

D

(a=2, b=2); (a=2, b=3); (a=3, b=4)



Ques 32 Computer Science


An array is [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] heapified. Which one of the following options represents the first three elements in the heapified array?

A

131, 101, 93

B

131, 93, 101

C

131, 11, 93

D

131, 111, 90



Ques 33 Computer Science


Consider the following recurrence relation:

Which one of the following options is CORRECT?

A

T(n) = Θ(n log log n)

B

T(n) = Θ(n log n)

C

T(n) = Θ(n2 log n)

D

T(n) = Θ(n2 log log n)



Ques 34 Computer Science


Consider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of k is

A

53

B

52

C

27

D

1



Ques 35 Computer Science


The symbol → indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?

A

(X,Y) → (Z,W) implies X → (Z,W)

B

(X,Y) → (Z,W) implies (X,Y) → Z

C

((X,Y) → Z and W → Y) implies (X,W) → Z

D

(X → Y and Y → Z) implies X → Z



Ques 36 Computer Science


Let G be a directed graph and T a depth first search (DFS) spanning tree in G that is rooted at a vertex v. Suppose T is also a breadth first search (BFS) tree in G, rooted at v. Which of the following statements is/are TRUE for every such graph G and tree T?

A

There are no back-edges in G with respect to the tree T

B

There are no cross-edges in G with respect to the tree T

C

There are no forward-edges in G with respect to the tree T

D

The only edges in G are the edges in T



Ques 37 Computer Science


Consider the following read-write schedule S over three transactions T1 T2, and T3 where the subscripts in the schedule indicate transaction IDs:

Which of the following transaction schedules is/are conflict equivalent to S?

A

T1 T2 T3

B

T1 T3 T2

C

T3T2 T1

D

T3T1 T2



Ques 38 Computer Science


Consider a Boolean function of 3 inputs F(X,Y,Z) = Σ(3,5,6,7). Which of the following expressions is/are CORRECT?

A

F(X,Y,Z) = Π(0,1,2,4)

B

F(X,Y,Z) = XY + YZ + XZ

C

F(X,Y,Z) is independent of input Y

D

F(X,Y,Z) is independent of input X



Ques 39 Computer Science


Consider the following C function definition.

Which of the following statements is/are TRUE about the above function?

A

If the inputs are x = 20 y = 10 then the return value is greater than 220

B

If the inputs are x = 20 y = 20, then the return value is greater than 220

C

If the inputs are x = 20 y = 10, then the return value is less than 210

D

If the inputs are x = 20 y = 20, then the return value is less than 220



Unique Visitor Count

Total Unique Visitors

Loading......