# Tag Archives: GATE-GATE IT 2004

Choose the correct option to fill the ?1 and ?2 so that the program prints an input string in reverse order. Assume that the input… Read More
What is the output of the following program? #include <stdio.h> int funcf (int x); int funcg (int y);    main() {     int x = 5,… Read More
Consider the following C program which is supposed to compute the transpose of a given 4 x 4 matrix M. Note that, there is an… Read More
Consider a list of recursive algorithms and a list of recurrence relations as shown below. Each recurrence relation corresponds to exactly one algorithm and is… Read More
Consider the undirected graph below: Using Prim’s algorithm to construct a minimum spanning tree starting with node A, which one of the following sequences of… Read More
Consider the undirected graph below: Using Prim’s algorithm to construct a minimum spanning tree starting with node A, which one of the following sequences of… Read More
Let f(n), g(n) and h(n) be functions defined for positive inter such that f(n) = O(g(n)), g(n) ≠ O(f(n)), g(n) = O(h(n)), and h(n) = O(g(n)).… Read More
Which one of the following binary trees has its inorder and preorder traversals as BCAD  and ABCD, respectively? (A) A (B) B (C) C (D)… Read More
An array of integers of size n can be converted into a heap by adjusting the heaps rooted at each internal node of the complete… Read More
A program attempts to generate as many permutations as possible of the string, ‘abcd’ by pushing the characters a, b, c, d in the same… Read More
The storage area of a disk has innermost diameter of 10 cm and outermost diameter of 20 cm. The maximum storage density of the disk… Read More
In an enhancement of a design of a CPU, the speed of a floating point unit has been increased by 20% and the speed of… Read More
A CPU has only three instructions I1, I2 and I3, which use the following signals in time steps T1-T5: I1 : T1 : Ain, Bout,… Read More
Consider a fully associative cache with 8 cache blocks (numbered 0-7) and the following sequence of memory block requests: 4, 3, 25, 8, 19, 6,… Read More
Consider a 4 stage pipeline processor. The number of cycles needed by the four instructions I1, I2, I3, I4 in stages S1, S2, S3, S4… Read More