PREVIOUS YEAR SOLVED PAPERS - GATE 2020

51. Consider the following C program.

 Int main() {
  Int a[4][5]={{1, 2, 3, 4, 5},
  {6, 7, 8, 9, 10},
  {11, 12, 13, 14, 15},
  {16, 17, 18, 9, 20}};
  Printf(“%d\n”, *(*(a+**a+2)+3);
  Return(0);
  }
  The output program is ______ .

Note – Numerical Type question

  • Option : A
  • Explanation :
    Gate2020 cs
    base address of a = 1000
    “*” → has higher precedence the “+”
    *(*(a + ** a + 2) + 3)
    Gate2020 cs
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


52. Consider the following language.
number of a’s in x is divisible by 2 but not divisible by 3
The minimum number of states in a DFA that accepts L is ____.

  • Option : C
  • Explanation :
    L = w ϵ (a, b)* |na(w) = multiple of 2 but not 3.
    L1 = {na mod 2 = 0} ⇒ need 2 states
    L2 = {na mod 3 ≠ 0} ⇒ need 3 states
    |L1 × L2| = (2 × 3) = 6 states.
    Minimal DFA design ⇒
    Gate2020 cs
    ∴ No. of states in min. DFA = 6 states.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


53. A processor has 64 registers and uses 16-bit instruction format. It has two type instruction: I-type and R-type. Each I-type instruction contains an opcode, a register name, and a 4-bit immediate value. Each R-type instruction contains an opcode and two register names. If there are 8 distinct I-type opcodes, then the maximum number of distinct R-type opcodes is _____.

  • Option : A
  • Explanation :
    Gate2020 cs
    ⇒ # of instruction possible = 24 = 16
    ∴ No. of free opcodes = 16 – x
    Let x is number of R-type instruction exist
    ∴ No. of I-type instruction possible = (16 – x) * 22
    8 = 64 – 4x
    4x = 64 – 8 = 56
    x = 14
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


54. The number of permutations of the characters in LILAC so that no characters appears in its original position, if the two L’s are indistinguishable, is _______.

  • Option : D
  • Explanation :
    LILAC
    IAC
    3! + LLAC
    3 + 4/2 + 3 + 4/2 + 4/2
    3 + 2 + 3 + 2 + 2 = 12
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


55. Graph G is obtained by adding vertex s to K3,4 and making s adjacent to every vertex of K3,4. The minimum number of colours required to edge-colour is G______.

  • Option : A
  • Explanation :
    Gate2020 cs
    Minimum number = 3 + 4
    Of edge-colors required = 7
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
GATE 2020