GATE IT 2004


Q1.

Consider the following statements: I. telnet, ftp and http are application layer protocols. II. EJB (Enterprise Java Beans) components can be deployed in a J2EE (Java2 Enterprise Edition) application server. III. If two languages conform to the Common Language Specification (CLS) of the Microsoft.NET frame work, then a class defined in any one of them may be inherited in the other. Which statements are true?
GateOverflow

Q2.

A CPU has only three instructions I1, I2 and I3, which use the following signals in time steps T1-T5: I1 : T1 : Ain, Bout, Cin T2 : PCout, Bin T3 : Zout, Ain T4 : Bin, Cout T5 : End I2 : T1 : Cin, Bout, Din T2 : Aout, Bin T3 : Zout, Ain T4 : Bin, Cout T5 : End I3 : T1 : Din, Aout T2 : Ain, Bout T3 : Zout, Ain T4 : Dout, Ain T5 : End Which of the following logic functions will generate the hardwired control for the signal Ain ?
GateOverflow

Q3.

Consider the following C program which is supposed to compute the transpose of a given 4 \times 4 matrix M. Note that, there is an X in the program which indicates some missing statements. Choose the correct option to replace X in the program. #include < stdio.h > #define ROW 4 #define COL 4 int M[ROW][COL] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; main() { int i, j, t; for (i = 0; i < 4; ++i) { X } for (i = 0; i < 4; ++i) for (j = 0; j < 4; ++j) printf ("%d", M[i][j]); }
GateOverflow

Q4.

Let f(n), g(n) and h(n) be functions defined for positive integers such that f(n) = O(g(n)), \; g(n) \neq O(f(n)), \; g(n) = O(h(n)), \text{ and } h(n) = O(g(n)). Which one of the following statements is FALSE?
GateOverflow

Q5.

Which one of the following binary trees has its inorder and preorder traversals as BCAD and ABCD, respectively?
GateOverflow

Q6.

In how many ways can we distribute 5 distinct balls, B_1, B_2, \ldots, B_5 in 5 distinct cells, C_1, C_2, \ldots, C_5 such that Ball B_i is not in cell C_i, \forall i= 1,2,\ldots 5 and each cell contains exactly one ball?
GateOverflow

Q7.

Which one of the following statements is FALSE?
GateOverflow

Q8.

Let x be an integer which can take a value of 0 or 1. The statement if (x == 0) x = 1; else x = 0; is equivalent to which one of the following ?
GateOverflow

Q9.

In a certain operating system, deadlock prevention is attemped using the following scheme. Each process is assigned a unique timestamp, and is restarted with the same timestamp if killed. Let P_h be the process holding a resource R, P_r be a process requesting for the same resource R, and T(P_h) and T(P_r) be their timestamps respectively. The decision to wait or preempt one of the processes is based on the following algorithm. if T(Pr) < T(Ph) then kill Pr else wait Which one of the following is TRUE?
GateOverflow

Q10.

A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come First Serve)?
GateOverflow