• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Sudo GATE 2020 Mock II (10 January 2019)

Question 31

How many states are required in a DFA to accept a binary string, whose decimal equivalent is divisible by 32 ?
  • 5
  • 6
  • 32
  • 33

Question 32

What is the radix of the number if the solution to quadratic equation x^2 − 10x + 31 = 0 is x = 5 and x = 8 ?
  • 11
  • 8
  • 10
  • 13

Question 33

The post-order traversal of a binary search tree is given by 2, 7, 6, 10, 9, 8, 15, 17, 20, 19, 16, 12. Then the pre-order traversal of this tree is:
  • 2, 6, 7, 8, 9, 10, 12, 15, 16, 17, 19, 20
  • 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20
  • 7, 2, 6, 8, 9, 10, 20, 17, 19, 15, 16, 12
  • 7, 6, 2, 10, 9, 8, 15, 16, 17, 20, 19, 12

Question 34

Given the grammar (G),
S → abc/ aAbc,
Ab →bA,
AC →Bbcc,
bB →Bb,
aB →aa/ aaA 
Language produced by the above grammar is ?
  • L = {anbncn: n≥0}
  • L = {anbncn: n>0}
  • L = {anbncn+2: n≥0}
  • L = {anbncn+2: n>0}

Question 35

When two 8-bit numbers (A7 A6 … A0) and (B7 B6 … B0) in 2’s complement representation (with A0 and B0 as the least significant bits) are added using ripple carry adder, the sum bits obtained are (S7 S6 … S0) and the carry bits are (C7 C6 … C0). Which of the following statement(s) is/are correct ?
  1. If two numbers with the same sign (both positive or both negative) are added, then overflow occurs if and only if the result has the opposite sign.
  2. The overflow and carry out can each occur without the other. In unsigned numbers, carry out is equivalent to overflow. In two\'s complement, carry out tells you nothing about overflow.
  • Only 1
  • Only 2
  • Both 1 and 2
  • None of these.

Question 36

Consider the following collection of relation schemes:
professor(profname, deptname)
department(deptname, building)
committee(profname,commname) 
Find all the professors who are in exactly (i.e., no more and no less) all those committees that Professor Smith is in.
  • R2 <- Πcommnameprofname(committee))
    R3 <- Πcommname(committee) - R2
    (committee / R2) - σprofname = Smith(committee ⋈ R3)
  • R2 <- Πcommnamecommname(committee))
    R3 <- σprofname = Smith(committee) - R2
    (committee / R2) - Πprofname(committee ⋈ R3)
  • R2 <- Πcommnameprofname = Smith(committee))
    R3 <- Πcommname(committee) - R2
    (committee / R2) - Πprofname(committee ⋈ R3)
  • None of the above.

Question 37

Find the number of minimum spanning trees in the following graph ?
  • 4806
  • 4608
  • 6408
  • None of these.

Question 38

Consider the following assembly codes : (P1) :
BYTE_VALUE  DB  150    // A byte value is defined
WORD_VALUE  DW  300    // A word value is defined
ADD  BYTE_VALUE, 65    // An immediate operand 65 is added
MOV  AX, 45H           // Immediate constant 45H is transferred to AX
(P2) :
MY_TABLE TIMES 10 DW 0  // Allocates 10 words (2 bytes) each initialized to 0
MOV EBX, [MY_TABLE]     // Effective Address of MY_TABLE in EBX
MOV [EBX], 110          // MY_TABLE[0] = 110
ADD EBX, 2              // EBX = EBX +2
MOV [EBX], 123          // MY_TABLE[1] = 123
Which of the following option is correct?
  • P1 uses immediate Addressing, and P2 uses Indirect Memory Addressing mode.
  • P1 uses immediate Addressing, and P2 uses Direct Memory Addressing mode.
  • P1 uses Direct Memory Addressing, and P2 uses Direct Memory Addressing mode.
  • None of these

Question 39

What is the time complexity of following function fun()? Assume that log(x) returns log value in base 2.
void fun()
{
   int i, j;
   for (i=1; i<=n; i++)
      for (j=1; j<=log(i); j++)
         printf("GeeksforGeeks");
}
  • Θ(n)
  • Θ(nLogn)
  • Θ(n^2)
  • Θ(n^2(Logn))

Question 40

Consider the following two statements.
  • S1: If I don’t study hard, I will not qualify in GATE.
  • S2: If I get admission in IIT, I qualified in GATE.
Which one of the following statements follows from S1 and S2 as per sound inference rules of logic?
  • If I qualified the GATE,I can not get admission in IIT.
  • If I don’t study hard,I can get admission in IIT.
  • If I qualify the GATE, I can get admission in IIT.
  • If I don’t study hard,I can not get admission in IIT.

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion