• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 2013

Question 21

What is the logical translation of the following statement?
  "None of my friends are perfect." 
gatecs201311
  • A
  • B
  • C
  • D

Question 22

Consider the following sequence of micro-operations.
     MBR ← PC 
     MAR ← X  
     PC ← Y  
     Memory ← MBR
Which one of the following is a possible operation performed by this sequence?
  • Instruction fetch
  • Operand fetch
  • Conditional branch
  • Initiation of interrupt service

Question 23

Consider a hard disk with 16 recording surfaces (0-15) having 16384 cylinders (0-16383) and each cylinder contains 64 sectors (0-63). Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is . A file of size 42797 KB is stored in the disk and the starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
  • 1281
  • 1282
  • 1283
  • 1284

Question 24

The number of elements that can be sorted in [Tex]\\Theta[/Tex](log n) time using heap sort is gatecs201312
  • A
  • B
  • C
  • D

Question 25

Consider the following function: 

C
int unknown(int n) {
    int i, j, k = 0;
    for (i  = n/2; i <= n; i++)
        for (j = 2; j <= n; j = j * 2)
            k = k + n/2;
    return k;
 }
(A)

[Tex]\\Theta(n^2) [/Tex]

(B)

[Tex]\\Theta(n^2Logn) [/Tex]

(C)

[Tex]\\Theta(n^3) [/Tex]

(D)

[Tex]\\Theta(n^3Logn) [/Tex]

  • A

  • B

  • C

  • D

Question 26

Consider the following languages. 

[caption width="800"] [/caption]

 Which one of the following statements is FALSE?

  • L2 is context-free.

  • L1 intersection L2 is context-free.

  • Complement of L2 is recursive.

  • Complement of L1 is context-free but not regular.

Question 27

Consider the DFA given. 

[caption width="800"] [/caption]

 Which of the following are FALSE?

  • Complement of L(A) is context-free.

  • L(A) = L((11*0+0)(0 + 1)*0*1*).

  • For the language accepted by A, A is the minimal DFA.

  • A accepts all strings over {0, 1} of length at least 2.

Question 28

A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W and X reads x from memory, increments by one, stores it to memory, and then terminates. Each of the processes Y and Z reads x from memory, decrements by two, stores it to memory, and then terminates. Each process before reading x invokes the P operation (i.e., wait) on a counting semaphore S and invokes the V operation (i.e., signal) on the semaphore S after storing x to memory. Semaphore S is initialized to two. What is the maximum possible value of x after all processes complete execution?

  • -2

  • -1

  • 1

  • 2

Question 29

In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are
  • Last fragment, 2400 and 2789
  • First fragment, 2400 and 2759
  • Last fragment, 2400 and 2759
  • Middle fragment, 300 and 689

Question 30

The following figure represents access graphs of two modules M1 and M2. The filled circles represent methods and the unfilled circles represent attributes. If method m is moved to module M2 keeping the attributes where they are, what can we say about the average cohesion and coupling between modules in the system of two modules? gatecs201315
  • There is no change.
  • Average cohesion goes up but coupling is reduced.
  • Average cohesion goes down and coupling also reduces.
  • Average cohesion and coupling increase.

There are 58 questions to complete.

Last Updated :
Take a part in the ongoing discussion