Foxoyo
Hey..!!
Practice
Select topics and difficulty and just practice mcqs.
Topics
GATE CSE
Topics
User (name or email)
Users
pick difficulty level
all
1
2
3
4
5
number of questions
10
30
50
70
100
Start
Let's practice 30 mcqs on
GATE CSE
mcqs by everyone
The smallest integer that can be represented by an 8-bit number in 2’s complement form is
-256
-127
-128
For the grammar below, a partial LL
(1) parsing table is also presented along with thegrammar.
Entries that need to be filled are indicated as E1, E2, and E3. ε is the empty string, $ indicates end of input, and, | separates alternate right hand sides ofproductions.
S → a A b B | b A a B | εA → SB → SThe FIRST and FOLLOW sets for the non-terminals A and B are
FIRST(A) = {a, b, ε} = FIRST(B) FOLLOW(A) = {a, b} FOLLOW(B) = Ø
FIRST(A) = {a, b, $} FIRST(B) = {a, b, ε} FOLLOW(A) = {a, b} FOLLOW(B) = {$}
FIRST(A) = {a, b} = FIRST(B) FOLLOW(A) = {a, b} FOLLOW(B) = {a, b}
FIRST(A) = {a, b, ε} = FIRST(B) FOLLOW(A) = {a, b} FOLLOW(B) = {a, b, $}
Consider the following relations A, B and C: How many tuples does the result of the following SQL query contain?SELECT
A.IdFROM AWHERE
A.Age > ALL (SELECT
B.Age FROM B WHERE
B.Name = ‘Arun’)
1
3
4
What is the correct translation of the following statement into mathematical logic? “Some real numbers are rational”
Ǝx (real(x) ᴧ rational(x))
Ǝx (real(x) → rational(x))
Ǝx (real(x) ᴠ rational(x))
Consider an undirected random graph of eightvertices.
The probability that there is an edge between a pair of vertices is 1/2. What is the expected number of unordered cycles of length three
1
1/8
7
8
Consider the following logicalinferences.
I1: If it rains then the cricket match will not beplayed.
The cricket match wasplayed.
Inference: There was norain.
I2: If it rains then the cricket match will not beplayed.
It did notrain.
Inference: The cricket match wasplayed.
Which of the following is TRUE
I1 is not correct but I2 is a correct inference
I1 is correct but I2 is not a correct inference
Both I1 and I2 are correct inferences
Both I1 and I1 are not correct inferences
Let A be the 2 * 2 matrix with elements a11 = a12 = a21 = +1 and a22 = -1. Then the eigenvalues of the matrix A19 are
512√2 and −512√2
4√2 and −4√2
1024 and −1024
1024√2 and −1024√2
Consider the following C codesegment.
What output will be generated by the given code segment if: Line 1 is replaced by auto int a = 1; Line 2 is replaced by register int a = 2;
3 1 4 1 4 2
4 2 6 2 2 0
4 2 6 1 6 1
4 2 4 2 2 0
Assume that source S and destination D are connected through two intermediate routers labeled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D
Network layer – 2 times and Data link layer – 6 times
Network layer – 4 times and Data link layer – 4 times
Network layer – 4 times and Data link layer – 3 times
Network layer – 4 times and Data link layer – 6 times
An index is clustered, if
it is on a set of fields that form a candidate key.
the data records of the file are organized not in the same order as the data entries of the index.
it is on a set of fields that include the primary key.
the data records of the file are organized in the same order as the data entries of the index.
Consider the following function:The return value of the function is
Θ(n2log n)
Θ(n3log n)
Θ(n2)
Θ(n3)
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter MultiDequeue(Q){ m = k while (Q is not empty) and (m > 0) { Dequeue(Q) m = m – 1 } }What is the worst case time complexity of a sequence of n queue operations on an initially empty queue
Θ(n2)
Θ(n + k)
Θ(n)
Θ(nk)
Which of the following statements is/are TRUE for undirected graphs? P: Number of odd degree vertices iseven.
Q: Sum of degrees of all vertices is even
P only
Neither P nor Q
Both P and Q
Q only
Which of the following transport layer protocols is used to support electronic mail
SMTP
UDP
TCP
IP
Suppose a fair six-sided die is rolledonce.
If the value on the die is 1, 2, or 3, the die is rolled a secondtime.
What is the probability that the sum total of values that turn up is at least 6
2/3
5/12
10/21
1/6
Consider a random variable X that takes values +1 and −1 with probability 0.5each.
The values of the cumulative distribution function F(x) at x = −1 and +1 are
0 and 1
0.25 and 0.75
0.5 and 1
0 and 0.5
Consider the directed graph shown in the figurebelow.
There are multiple shortest paths between vertices S and T. Which one will be reported by Dijkstra’s shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discovered
SBDT
SACDT
SACET
SDT
Consider the function f(x) = sin(x) in the interval x ϵ [π/4, 7π/4]. The number and location(s) of the local minima of this function are
Two, at π/2 and 3π/2
Two, at π/4 and 3π/2
One, at 3π/2
One, at π/2
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is
T(n) = 2T(n − 2) + 2
T(n) = 2T(n/2) + 1
T(n) = 2T(n − 1) + 1
T(n) = 2T(n − 1) + n
Relation R has eight attributesABCDEFGH.
Fields of R contain only atomicvalues.
F={CH→G, A→BC, B→CFH, E→A, F→EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R.The relation R is
in 2NF, but not in 3NF.
in 3NF, but not in BCNF.
in 1NF, but not in 2NF.
in BCNF.
For the grammar below, a partial LL
(1) parsing table is also presented along with thegrammar.
Entries that need to be filled are indicated as E1, E2, and E3. ε is the empty string, $ indicates end of input, and, | separates alternate right hand sides ofproductions.
S → a A b B | b A a B | εA → SB → SThe appropriate entries for E1, E2, and E3 are
E1: A → S, S → ε E2: B → S, S → ε E3: B → S
E1: S → aAbB, S → ε E2: S → bAaB, S → ε E3: B → S
E1: S → aAbB, S → ε E2: S → bAaB, S → ε E3: S → ε
E1: S → aAbB, A → S E2: S → bAaB, B → S E3: B → S
Given the language L = {ab, aa, baa}, which of the following strings are in L*? 1) abaabaaabaa 2) aaaabaaaa 3) baaaaabaaaab 4) baaaaabaa
2, 3 and 4
1, 2 and 3
1, 3 and 4
1, 2 and 4
The number of elements that can be sorted in Θ(log n) time using heap sort is
Θ(log n/log log n)
Θ(1)
Θ(log n)
Θ(√log n)
Which of the following statements are TRUE? 1. The problem of determining whether there exists a cycle in an undirected graph is in P. 2. The problem of determining whether there exists a cycle in an undirected graph is in NP. 3. If a problem A is NP-Complete, there exists a non-deterministic polynomial time algorithm to solve A
1, 2 and 3
1 and 3 only
1 and 2 only
2 and 3 only
A binary operation ⊕ on a set of integers is defined as x⊕y = x2 + y2
. Which one of the following statements is TRUE about ⊕
Neither commutative nor associative
Associative but not commutative
Commutative but not associative
Both commutative and associative
The bisection method is applied to compute a zero of the function f(x) = x4 - x3 - x2 - 4 in the interval [1,9]. The method converges to a solution after ––––– iterations
5
7
3
1
What is the logical translation of the following statement? “None of my friends areperfect.
”
¬ Ǝx(F(x) ᴧ P(x))
Ǝx(¬ F(x) ᴧ P(x))
Ǝx(F(x) ᴧ ¬ P(x))
Ǝx(¬ F(x) ᴧ ¬ P(x))
Were you a bird, you ___________________ in the sky
should fly
shall have flown
shall fly
would fly
Function f is known at the following points:The value of computed using the trapezoidal rule is
8.983
9.045
9.003
9.017
Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of n nodes
O(n)
O(1)
O(log n)
O(n log n)
Learn
Correct Attempts
Score
00/00
in
00:00