GATE 2012 CSE & IT
45 questions across 1 session
Fetch_And_Add (X, i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used...
Let $$G$$ be a complete undirected graph on $$6$$ vertices. If vertices of $$G$$ $$\,\,\,\,$$ are labeled, then the number of distinct cycles of length $$4$$ in $$G$$ is equal to
Consider the following logical inferences. $${{\rm I}_1}:$$ If it rains then the cricket match will not be played. The cricket match was played. Inference: there was no rain. $${{\...
How many onto (or subjective) functions are there form an n-element $$(n\, \ge \,2)$$ set to a 2-element set ?
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 fr...
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 F...
Let G be a weighted graph with edge weights greater than one and G' be the graph constructed by squaring the weights of edges in G. Let T and T' be the minimum spanning trees of G...
Register renaming is done in pipelined processors
Let $$A$$ be the $$2 \times 2$$ matrix with elements $${a_{11}} = {a_{12}} = {a_{21}} = + 1$$ and $${a_{22}} = - 1$$. Then the eigen values of the matrix $${A^{19}}$$ are
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...
Which of the following transport layer protocols is used to support electronic mail?
Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at th...
What is the correct translation of the following statement into mathematical logic? "Some real numbers are rational"
Suppose R 1 ( A, B) and R 2 ( C, D) are two relation schemas. Let r 1 and r 2 be the corresponding relation instances. B is a foreign key that refers to C in R 2 . If data in r 1 a...
A computer has a $$256$$ $$K$$ Byte, $$4$$-way set associative, write back data cache with block size of $$32$$ Bytes. The processor sends $$32$$ bit addresses to the cache control...
The protocol data unit (PDU) for the application layer in the Internet stack is
Which of the following is TRUE?
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height (root) to compute the height...
The decimal value $$0.5$$ in $$IEEE$$ single precision floating point representation has
Consider a source computer (S) transmitting a file of size 10 6 bits to a destination computer (D) over a network of two routers (R 1 and R 2 ) and three links (L 1 , L 2 , and L 3...
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
The worst case running time to search for an element in a balanced binary search tree with n2 n elements is
Consider the following relations A, B and C: A ID Name Age 12 Arun 60 15 Shreya 24 99 Rohit 11 B ID Name Age 15 Shreya 24 25 Hari 40 98 Rohit 20 99 Rohit 11 C ID Phone Area 10 2200...
Let W(n) and A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size n. Which of the following is ALWAYS TRUE?
A file system with 300 G Byte 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 i...
Consider the $$3$$ processes, $$P1,$$ $$P2$$ and $$P3$$ shown in the table. Process Arrival Time Time Units Required P1 0 5 P2 1 7 P3 3 4 The completion order of the $$3$$ processe...
The recurrence relation capturing the optional execution time of the Towers of Hanoi problem with $$n$$ discs is
What will be the output of the following C program segment? Char inchar = 'A'; Switch ( inchar ) { case 'A' : printf ("Choice A\ n") ; case 'B' : case 'C' : printf (“Choice B”) ; c...
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main( ) { static int a = 1; /* Line 1 */ prtFun(); a + = 1; prtFun(); printf("\n %d %d ", a, b); } void p...
Let G be a simple undirected planner graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equal to
A process executes the code fork $$\left( {\,\,\,} \right);$$ fork $$\left( {\,\,\,} \right);$$ fork $$\left( {\,\,\,} \right);$$ The total number of child processes created is
Which of the following statements are TRUE about an SQL query? P: An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause Q: An SQL query can contain a...
A computer has a $$256$$ $$K$$ Byte, $$4$$-way set associative, write back data cache with block size of $$32$$ Bytes. The processor sends $$32$$ bit addresses to the cache control...
Consider the following relations A, B and C: A ID Name Age 12 Arun 60 15 Shreya 24 99 Rohit 11 B ID Name Age 15 Shreya 24 25 Hari 40 98 Rohit 20 99 Rohit 11 C ID Phone Area 10 2200...
Consider a random variable X that takes values + 1 and-1 with probability 0.5 each. The values of the cumulative distribution function F(x) at x = - 1 and + 1 are
Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted. Program main; Var . . . Procedure A1; Var . . . Ca...
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main( ) { static int a = 1; /* Line 1 */ prtFun(); a + = 1; prtFun(); printf("\n %d %d ", a, b); } void p...
Consider the function $$f\left( x \right) = \sin \left( x \right)$$ in the interval $$x \in \left[ {\pi /4,\,\,7\pi /4} \right].$$ The number and location(s) of the local minima of...
Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2 or 3 the die is rolled a second time. What is the probability that the sum total of values that turn up...
Given the language L= { ab, aa, baa }, which of the following strings are in L* ? 1) abaabaaabaa 2) aaaabaaaa 3) baaaaabaaaab 4) baaaaabaa
Consider the following transactions with data items P and Q initialized to zero: T 1 : read (P) ; read (Q) ; if P = 0 then Q : = Q + 1 ; write (Q). T 2 : read (Q) ; read (P) if Q =...
The amount of $$ROM$$ needed to implement a $$4$$ bit multiplier is
Given the basic $$ER$$ and relational models, which of the following is INCORRECT?
Which of the following problems are decidable? $$1.$$ Does a given program ever produce an output? $$2.$$ If L is a context-free language, then, is $$\overline L $$ also context-fr...