GATE 2011 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2011

81 questions

MCQ 811-mark 40 · 2-mark 41

Questions 51–55 of 81

Q51SQL2 marksMCQ−0.67 if wrong
Database table by name Loan_Records is given below.
BorrowerBank_ManagerLoan_Amount RameshSunderajan10000.00 SureshRamgopal5000.00 MaheshSunderajan7000.00
What is the output of the following SQL query?
 
SELECT count(*)
FROM(
(SELECT Borrower, Bank_Manager FROM Loan_Records) AS S
NATURAL JOIN
(SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T); 

Q52SQL2 marksMCQ−0.67 if wrong
Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X=1,Y=1) is inserted in the table.

Let MX and MY denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX+1, 2*MY+1 respectively. It may be noted that each time after the insertion, values of MX and MY change.

What will be the output of the following SQL query after the steps mentioned above are carried out?

SELECT Y FROM T WHERE X=7;

Q53Network Layer Protocol2 marksMCQ−0.67 if wrong
Consider a network with five nodes, N1 to N5, as shown below
N1N5N2N4N3 36421
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.

After the update in the previous question (the cost of link N2-N3 reduces to 2 in both directions, and the next round of updates is done), the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector cost as, ∞\infty. After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3?

Q54Network Layer Protocol2 marksMCQ−0.67 if wrong
Consider a network with five nodes, N1 to N5, as shown below
N1N5N2N4N3 36421
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.

The cost of link N2-N3 reduces to 2(in both directions). After the next round of updates, what will be the new distance vector at node, N3?

Q55Transport Layer Protocol1 markMCQ−0.33 if wrong
A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT