GATE 2014 (Session 2)
65 questions
MCQ 42 · NAT 231-mark 30 · 2-mark 35
Questions 31–35 of 65
The maximum number of super keys for the relation schema R (E, F, G, H) with E as the key is __________.
Answer: 8
Every super key has to include E. Each of the other attributes F, G and H can be either in the key or left out.
Number of super keys:
Answer: 8
Number of super keys:
Answer: 8
Given an instance of the STUDENTS relation as shown below
For (StudentName, StudentAge) to be a key for this instance, the value x should NOT be equal to_______.
For (StudentName, StudentAge) to be a key for this instance, the value x should NOT be equal to_______.
Answer: 19
The table already has a row with (Shankar, 19), which belongs to StudentID 7853.
Suppose x = 19. Then row 2345 would also hold (Shankar, 19). The pair (StudentName, StudentAge) would then repeat, so it could not be a key.
Answer: 19
Suppose x = 19. Then row 2345 would also hold (Shankar, 19). The pair (StudentName, StudentAge) would then repeat, so it could not be a key.
Answer: 19
Which one of the following is TRUE about the interior gateway routing protocols - Routing Information Protocol (RIP) and Open Shortest Path First (OSPF)?
Answer: (A)
RIP sends its distance vectors to its neighbours. It works by the Bellman-Ford method. OSPF floods link-state advertisements through the network. Then it runs Dijkstra.
Answer: RIP uses distance vector routing and OSPF uses link state routing
Answer: RIP uses distance vector routing and OSPF uses link state routing
Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket?
Answer: (C)
Let us look at each function one by one:
- connect: opens an active connection to a server
- bind: ties a local address and port to the socket
- listen: makes the socket passive, so it is ready to accept connections True
- accept: picks up a connection from a socket that is already listening
Answer: listen
- connect: opens an active connection to a server
- bind: ties a local address and port to the socket
- listen: makes the socket passive, so it is ready to accept connections True
- accept: picks up a connection from a socket that is already listening
Answer: listen
In the diagram shown below, L1 is an Ethernet LAN and L2 is a Token-Ring LAN. An IP packet originates from sender S and traverses to R, as shown. The links within each ISP and across the two ISPs, are all point-to-point optical links. The initial value of the TTL field is 32. The maximum possible value of the TTL field when R receives the datagram is ________.


Answer: 26
TTL is lowered by 1 at each router (layer-3 device) that forwards the packet. Hubs, switches and bridges inside a LAN work below the IP layer and do not change it, and token-ring stations only pass frames on.
For the maximum possible TTL, take the triangles inside L1 as LAN devices (S itself is drawn as one). The routers (squares) on the path are: the gateway of L1, two routers in ISP1, and two in ISP2, the last of which is the gateway into L2. That is 5 routers.
Answer: 26, as given in the official GATE 2014 answer key.
Note: Counting only the 5 routers on the path gives 27. The official answer 26 needs six decreases of TTL, one more than the five routers shown. That happens only if one more device is taken to lower TTL, such as the sender S, the receiver R or one of the triangles in L1; ordinary hosts and LAN devices do not change TTL.
For the maximum possible TTL, take the triangles inside L1 as LAN devices (S itself is drawn as one). The routers (squares) on the path are: the gateway of L1, two routers in ISP1, and two in ISP2, the last of which is the gateway into L2. That is 5 routers.
Answer: 26, as given in the official GATE 2014 answer key.
Note: Counting only the 5 routers on the path gives 27. The official answer 26 needs six decreases of TTL, one more than the five routers shown. That happens only if one more device is taken to lower TTL, such as the sender S, the receiver R or one of the triangles in L1; ordinary hosts and LAN devices do not change TTL.