GATE CS-2 Kindly Submit Your Details, Then You Can Start Your Test !! Name Mobile No. Email City State Country Course 1. Let X be a Gaussian random variable mean 0 and variance σ2. Let Y = max(X, 0) where max (a, b) is the maximum of a and b. The median of Y is _____. A. 0 B. 1 C. 2 D. 3 2.above logic is implemented 2-input NOR gates only. The minimum number of gates required is _____. A. 0 B. 1 C. 2 D. 3 3. A. I only B. I and IV only C. II only D. II and III only 4. Match the algorithms to the design paradigms they are based on. A. P-(ii), Q-(iii), R-(i) B. P-(iii), Q-(i), R-(ii) C. P-(ii), Q-(i), R-(iii) D. P-(i), Q-(ii), R-(iii) 5. Which of the following are possible security violations? A sender S sends a message m to receiver R, whichis digitally signed by S with its private key. In thisscenario, one or more of the following securityviolations can take place.I. S can launch a birthday attack to replace m with afraudulent message.II. A third party attacker can launch a birthdayattack to replace m with a fraudulent message.III. R can launch a birthday attack to replace m witha fraudulent message. A. I and II only B. I only C. II only D. II and III only 6. What is FOLLOW (Q)? A. {R} B. {w} C. {w, y} D. {w, $} 7. A. 2 B. 3 C. 4 D. 5 8. Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache 0.1, the L2 cache experiences, on average, 7 misses per 1000 instructions. The miss rate of L2 expressed correct to two decimal places is _____. A. 0.05 B. 0.07 C. 0.03 D. 0.01 9. If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes., then the average waiting time across all processes is ____ milliseconds. A. 0 B. 1 C. 2 D. 3 10. Threads of a process share A. global variable but not heap B. heap but not global variables C. neither global variables nor heap D. Both heap and global variables 11. 12. A. append list m to the end of list n for all inputs B. either cause a null pointer dereference or append list m to the end of list n C. cause a null pointer dereference for all inputs D. append list n to the end of list m for all inputs 13. The n-bit fixed-point representation of an unsigned real number real X uses f bits for the fraction part. Let The range of decimal values for X in this representation is A. 2-f to 2i B. 2-f to (2i – 2-f) C. 0 to 2i D. 0 to (2i – 2-f) 14. 15.Consider the C struct defined below:struct data {int marks [100];char grade;int cnumber;};struct data student;The base address of student is available in registerR1. The field student.grade can be accessedefficiently using A. Post-increment addressing mode. (R1)+ B. Pre-decrement addressing mode, -(R1) C. Register direct addressing mode, R1 D. Index addressing mode, X(R1), where X is an offset represented in 2’s complement 16- bit representation. 16. Consider a TCP client and a TCP server running on two different machines. After completing data transfer, the TCP client calls close to terminate the connectional and a FIN segment is sent to the TCP server. Server-side TCP responds by sending an ACK which is received by the client-side TCP. As per the TCP connections state diagram (RFC 793), in which state does the client-side TCP connection wait for the FIN from the sever-side TCP? A. LAST-ACK B. TIME-WAIT C. FIN-WAIT-1 D. FIN-WAIT-2 17. Which one of the following represents the language generated by the above grammar? 18. A. IV only B. I and IV only C. II only D. II and III only 19.When two 8-bit numbers A7…A0 and B7…B0 in 2’scomplement representation (with A0 and B0 as theleast significant bits) are added using a ripple-carryadder, the sum bits obtained are S7….S0 and thecarry bits are C7…..C0. An overflow is said to haveoccurred if 20. A. 0.3 B. 1.4 C. 2.6 D. 3.1 21. 22. 23. Let T be a tree with 10 vertices. The sum of the degrees of all the vertices in T is _____. A. 0 B. 10 C. 18 D. 20 24. Let T be a binary search tree with 15 nodes. The minimum and maximum possible heights of T are: Note: The height of a tree with a single node is 0. A. 4 and 15 respectively B. 3 and 14 respectively C. 4 and 14 respectively D. 3 and 15 respectively 25. A. compiler error as the return of malloc is not typecast appropriately. B. compiler error because the comparison should be made as x==NULL and not as shown. C. compiles successfully but execution may result in dangling pointer. D. compiles successfully but execution may result in memory leak. 26. 27. The number of integers between 1 and 500 (both inclusive) that are divisible by 3 or 5 or 7 is ______. A. 212 B. 271 C. 311 D. 354 28. If the target of the branch instruction is i, then the decimal value of the Offset is _____. Consider a RISC machine where each instruction isexactly 4 bytes long. Conditional and unconditionalbranch instructions use PC- relative addressingmode with Offset specified in bytes to the targetlocation of the branch instruction. Further the Offsetis always with respect to the address of the nextinstruction in the program sequence. Consider thefollowing instruction sequence. A. -10 B. -16 C. -22 D. -25 29. A. Return of 6 and 6 respectively. B. Infinite loop and abnormal termination respectively C. Abnormal termination and infinite loop respectively. D. Both terminating abnormally 30. In a RSA cryptosystem a participant A uses two prime numbers p = 13 and q = 17 to generate her public and private keys. If the public key of A is 35. Then the private key of A is ______. A. 09 B. 11 C. 21 D. 31 31. Let A be an array of 31 numbers consisting of sequence of 0’s followed by a sequence of 1’s. The problem is to find the smallest index i that A[i] is 1 by probing the minimum numbers of locations in A. The worst case number of probes performed by an optimal algorithm is _____. A. 2 B. 3 C. 4 D. 5 32. A. abab B. aaab C. abbaa D. babba 33. A. is 0 B. is -1 C. is 1 D. does not exist 34.Instructions execution in a processor is divided into5 stages. Instruction Fetch (IF), Instruction Decode(ID), Operand Fetch (OF), Execute (EX), and WriteBack (WB), These stages take 5,4,20, 10 and 3nanoseconds (ns) respectively. A pipelinedimplementation of the processor requires bufferingbetween each pair of consecutive stages with a delayof 2ns. Two pipelined implementations of theprocessor are contemplated.(i) a naïve pipeline implementation (NP) with 5stages and(ii) an efficient pipeline (EP) where the OF stage iddivided into stages OF1 and OF2 with executiontimes of 12 ns and 8 ns respectively.The speedup (correct to two decimals places)achieved by EP over NP in executing 20 independentinstructions with no hazards is _____. A. 0.43 B. 1.50 C. 2.31 D. 3.23 35. Which of the above queries are safe? A. (I) and (II) only B. (I) and (III) only C. (II) and (III) only D. (I), (II) and (III) 36. Which of the following is CORRECT? Recall that Belady’s anomaly is that the pages-faultrate may increase as the number of allocated framesincreases. Now consider the following statements:S1: Random page replacement algorithm (where apage chosen at random is replaced) suffers fromBelady’s anomalyS2: LRU page replacement algorithm suffers fromBelady’s anomaly A. S1 is true, S2 is true B. S1 is true, S2 is false C. S1 is false, S2 is true D. S1 is false, S2 is false 37. The output of executing the following C program is ____. A. 12 B. 23 C. 31 D. 44 38. A. 1 B. 2 C. 3 D. 4 39. A. I only B. II only C. I and II D. Neither I nor II 40. Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks. (0,128,256,128,0,128,256,128,1,129,257,129,1,12 9,257,129) is repeated 10 times. The number of conflict misses experienced by the cache is __________. A. 43 B. 56 C. 63 D. 76 41. Let u and v be two vectors in whose Euclidean norms satisfy What is the value of such that bisects the angle between u and v? A. 2 B. ½ C. 1 D. -1/2 42. A. 128 B. 512 C. 1024 D. 2048 43. A. The database system is both deadlock-free and starvation- free. B. The database system is deadlock-free, but not starvation-free. C. The database system is starvation-free but not deadlock-free. D. The database system is neither deadlock-free nor starvation-free. 44. A. f if computable if and only if Lf is recursive. B. f is computable if and only Lf recursively enumerable. C. If f is computable then Lf is recursive, but not conversely. D. If f is computable then Lf is recursively enumerable, but not conversely. 45. A. 0 B. 1 C. 2 D. 3 46. Which of the above statements is/are necessarily true? Let G = (V, E) be any connected undirected edgeweightedgraph. The weights of the edges in E arepositive and distinct. Consider the followingstatements:(I) Minimum spanning tree of G is always unique.(II) Shortest path between any two vertices of G isalways unique. A. (I) only B. (II) only C. Both (I) and (II) D. Neither (I) nor (II) 47. A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot re-acquire lock l without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of x and the minimum value of y together for which execution of P can result in a deadlock are: A. x = 1, y = 2 B. x = 2, y = 1 C. x = 2, y = 2 D. x = 1, y = 1 48. Assume that there are no transmission errors. Then the transmission efficiency (expressed in percentage) of the Stop-and – Wait ARQ protocol for the above parameters is _____. The values of parameters for the Stop-and – WaitARQ protocol are as given below:Bit rate of the transmission channel = 1 MbpsPropagation delay from sender to receiver = 0.75 msTime to process a frame = 0.25 msNumber of bytes in the information frame = 1980Number of bytes in the acknowledge frame = 20Number of overhead bytes in the information frame= 20 A. 75.33 B. 89.33 C. 92.33 D. 99.33 49. A computer network uses polynomials over GF(2) for error checking with 8 bits as information bits and uses x3 + x + 1 as the generator polynomial to generate the check bits. In this network, the message 01011011 is transmitted as A. 01011011010 B. 01011011011 C. 01011011101 D. 01011011100 50. Let p, q, and r be propositions and the expression (p → q) → r be a contradiction. Then, the expression (r → p) → q is A. a tautology B. a contradiction C. always TRUE when p is FALSE D. always TRUE when q is TRUE 51. A cache memory unit with capacity of N words and block size of B words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is ______ bits. A. 12 B. 14 C. 16 D. 18 52. A. 53423122233445 B. 53423120112233 C. 53423122132435 D. 53423120213243 53. A. 2 B. 3 C. 4 D. 5 54. Which of the above statements about eigen values of A is/are necessarily CORRECT? A. Both (I) and (II) B. (I) only C. (II) only D. Neither (I) nor (II) 55. Consider the context-free grammars over the alphabet {a,b,c} given below. S and T are nonterminals A. Finite B. Not finite but regular C. Context-free but not regular D. Recursive but not context-free 56. Which of the following options is the closest in meaning to the phrase underlined in the sentence below? It is fascinating to see life forms cope with varied environmental conditions. A. adopt to B. adapt to C. adept in D. accept with 57. Choose the most appropriate word from the options given below to complete the following sentence. He could not understand the judges awarding her the first prize, because he thought that her performance was quite __________. A. superb B. medium C. mediocre D. exhilarating 58. In a press meet on the recent scam, the minister said, "The buck stops here". What did the minister convey by the statement? A. He wants all the money B. He will return the money C. He will assume final responsibility D. He will resist all enquiries 60. What can be inferred from this passage? The Palghat Gap (or Palakkad Gap), a region about 30km wide in the southern part of the Western Ghats inIndia, is lower than the hilly terrain to its north andsouth. The exact reasons for the formation of this gap arenot clear. It results in the neighboring regions of TamilNadu getting more rainfall from the South West monsoonand the neighboring regions of Kerala having highersummer temperatures. A. The Palghat gap is caused by high rainfall and high temperatures in southern Tamil Nadu and Kerala B. The regions in Tamil Nadu and Kerala that are near the Palghat Gap are low-lying C. The low terrain of the Palghat Gap has a significant impact on weather patterns in neighboring parts of Tamil Nadu and Kerala D. Higher summer temperatures result in higher rainfall near the Palghat Gap area 61. Geneticists say that they are very close to confirming the genetic roots of psychiatric illnesses such as depression and schizophrenia, and consequently, that doctors will be able to eradicate these diseases through early identification and gene therapy. On which of the following assumptions does the statement above rely? A. Strategies are now available for eliminating psychiatric illnesses B. Certain psychiatric illnesses have a genetic basis C. All human diseases can be traced back to genes and how they are expressed D. In the future, genetics will become the only relevant field for identifying psychiatric illnesses 62. Round-trip tickets to a tourist destination are eligible for a discount of 10% on the total fare. In addition, groups of 4 or more get a discount of 5% on the total fare. If the one way single person fare is Rs 100, a group of 5 tourists purchasing round-trip tickets will be charged Rs _________. A. 1500 B. 850 C. 650 D. 950 63. When a point inside of a tetrahedron (a solid with four triangular surfaces) is connected by straight lines to its corners, how many (new) internal planes are created with these lines? _____________ A. 4 B. 3 C. 5 D. 6 64. Suppose you break a stick of unit length at a point chosen uniformly at random. Then the expected length of the shorter stick is ________ A. 0.5 B. 0.25 C. 0.15 D. 0.75 65. Consider the following system of equations: 3x + 2y = 14x + 7z = 1x + y + z = 3x – 2y + 7z = 0The number of solutions for this system is _________ A. 1 B. 2 C. 3 D. 0 Warning: Undefined array key "correct_answer_logic" in /home/kaling/public_html/kalingaplus/wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php on line 451 Time's up