Home / GATE 2017-2018 / GATE CSE :: Practice Test Paper 1

GATE 2017-2018 :: GATE CSE

  1. An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
  2. A.
    245.248.136.0/21 and 245.248.128.0/22
    B.
    245.248.128.0/21 and 245.248.128.0/22
    C.
    245.248.132.0/22 and 245.248.132.0/21
    D.
    245.248.136.0/24 and 245.248.132.0/21

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Suppose a circular queue of capacity (n −1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
  4. A.
    full: (REAR+1) mod n == FRONT 
    empty: REAR == FRONT
    B.
    full: (REAR+1) mod n == FRONT 
    empty: (FRONT+1) mod n == REAR
    C.
    full: REAR == FRONT 
    empty: (REAR+1) mod n == FRONT
    D.
    full: (FRONT+1) mod n == REAR 
    empty: REAR == FRONT

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.

    The correct set of activation records along with their access links is given by
  6. A.
    .

    B.
    .

    C.
    .

    D.
    .

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. How many onto (or surjective) functions are there from an n-element (n ≥ 2) set to a 2-element set?
  8. A.
    2n
    B.
    2n - 1
    C.
    2n - 2
    D.
    2(2n - 2)

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Consider the directed graph shown in the figure below. 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.

  10. A.
    SDT
    B.
    SBDT
    C.
    SACDT
    D.
    SACET

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
  12. A.
    3 KBytes
    B.
    35 KBytes
    C.
    280 KBytes
    D.
    dependent on the size of the disk

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Consider the virtual page reference string 
    1, 2, 3, 2, 4, 1, 3, 2, 4, 1 
    on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then
  14. A.
    OPTIMAL < LRU < FIFO
    B.
    OPTIMAL < FIFO < LRU
    C.
    OPTIMAL = LRU
    D.
    OPTIMAL = FIFO

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Suppose R1(A, B) and R2(C, D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?
  16. A.
    πB(r1) - πC(r2) = Ø
    B.
    πC(r2) - πB(r1) = Ø
    C.
    πB(r1) = πC(r2)
    D.
    πB(r1) - πC(r2) ≠ Ø

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Consider a source computer (S) transmitting a file of size 106 bits to a destination computer (D) over a network of two routers (R1 and R2) and three links (L1, L2 and L3). L1 connects S to R1; L2 connects R1 to R2; and L3 connects R2 to D. Let each link be of length 100 km. Assume signals travel over each link at a speed of 108 meters per second. Assume that the link bandwidth on each link is 1Mbps. Let the file be broken down into 1000 packets each of size 1000 bits. Find the total sum of transmission and propagation delays in transmitting the file from S to D?
  18. A.
    1005 ms
    B.
    1010 ms
    C.
    3000 ms
    D.
    3003 ms

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below.

    The missing arcs in the DFA are
  20. A.
    .

    B.
    .

    C.
    .

    D.
    .

    View Answer

    Workspace

    Discuss Discuss in Forum