• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE IT 2006

Question 41

A cache line is 64 bytes. The main memory has latency 32ns and bandwidth 1G.Bytes/s. The time required to fetch the entire cache line from the main memory is
  • 32 ns
  • 64 ns
  • 96 ns
  • 128 ns

Question 42

A computer system has a level-1 instruction cache (1-cache), a level-1 data cache (D-cache) and a level-2 cache (L2-cache) with the following specifications:
2006_43
The length of the physical address of a word in the main memory is 30 bits. The capacity of the tag memory in the I-cache, D-cache and L2-cache is, respectively,
  • 1 K x 18-bit, 1 K x 19-bit, 4 K x 16-bit
  • 1 K x 16-bit, 1 K x 19-bit, 4 K x 18-bit
  • 1 K x 16-bit, 512 x 18-bit, 1 K x 16-bit
  • 1 K x 18-bit, 512 x 18-bit, 1 K x 18-bit

Question 43

Which of the following sequences of array elements forms a heap?

  • {23, 17, 14, 6, 13, 10, 1, 12, 7, 5}

  • {23, 17, 14, 6, 13, 10, 1, 5, 7, 12}

  • {23, 17, 14, 7, 13, 10, 1, 5, 6, 12}

  • {23, 17, 14, 7, 13, 10, 1, 12, 5, 7}

Question 44

Suppose that we have numbers between 1 and 100 in a binary search tree and want to search for the number 55. Which of the following sequences CANNOT be the sequence of nodes examined?
  • {10, 75, 64, 43, 60, 57, 55}
  • {90, 12, 68, 34, 62, 45, 55}
  • {9, 85, 47, 68, 43, 57, 55}
  • {79, 14, 72, 56, 16, 53, 55}

Question 45

Which of the following is the correct decomposition of the directed graph given below into its strongly connected components?
2006_46
  • {P, Q, R, S}, {T}, {U}, {V}
  • {P,Q, R, S, T, V}, {U}
  • {P, Q, S, T, V}, {R}, {U}
  • {P, Q, R, S, T, U, V}

Question 46

Consider the depth-first-search of an undirected graph with 3 vertices P, Q, and R. Let discovery time d(u) represent the time instant when the vertex u is first visited, and finish time f(u) represent the time instant when the vertex u is last visited. Given that
d(P) = 5 units f(P) = 12 units
d(Q) = 6 units f(Q) = 10 units
d(R) = 14 unit f(R) = 18 units
which one of the following statements is TRUE about the graph
  • There is only one connected component
  • There are two connected components, and P and R are connected
  • There are two connected components, and Q and R are connected
  • There are two connected components, and P and Q are connected

Question 47

The characters a to h have the set of frequencies based on the first 8 Fibonacci numbers as follows
a : 1, b : 1, c : 2, d : 3, e : 5, f : 8, g : 13, h : 21/
A Huffman code is used to represent the characters. What is the sequence of characters corresponding to the following code? 110111100111010
  • fdheg
  • ecgdf
  • dchfg
  • fehdg

Question 48

Which one of the choices given below would be printed when the following program is executed ?
C
 #include <stdio.h>
struct test {
               int i;
               char *c;
}st[] = {5, \"become\", 4, \"better\", 6, \"jungle\", 8, \"ancestor\", 7, \"brother\"};
main ()
{ 
    struct test *p = st;
    p += 1;
    ++p -> c;
    printf(\"%s,\", p++ -> c);
    printf(\"%c,\", *++p -> c);
    printf(\"%d,\", p[0].i);
    printf(\"%s \\n\", p -> c);
} 
  • jungle, n, 8, nclastor
  • etter, u, 6, ungle
  • cetter, k, 6, jungle
  • etter, u, 8, ncestor

Question 49

Which one of the choices given below would be printed when the following program is executed? C
#include
void swap (int *x, int *y)
{
    static int *temp;
    temp = x;
    x = y;
    y = temp;
}
void printab ()
{
    static int i, a = -3, b = -6;
    i = 0;
    while (i <= 4)
    {
        if ((i++)%2 == 1) continue;
        a = a + i;
        b = b + i;
    }
    swap (&a, &b);
    printf(\"a =  %d, b = %d\\n\", a, b);
}
main()
{
    printab();
    printab();
} 
  • a = 0, b = 3
    a = 0, b = 3
  • a = 3, b = 0
    a = 12, b = 9
  • a = 3, b = 6
    a = 3, b = 6
  • a = 6, b = 3
    a = 15, b = 12

Question 50

Which one of the choices given below would be printed when the following program is executed? 

C
 #include
int a1[] = {6, 7, 8, 18, 34, 67};
int a2[] = {23, 56, 28, 29};
int a3[] = {-12, 27, -31};
int *x[] = {a1, a2, a3};
void print(int *a[])
{
            printf(\"%d,\", a[0][2]);
            printf(\"%d,\", *a[2]);
            printf(\"%d,\", *++a[0]);
            printf(\"%d,\", *(++a)[0]);
            printf(\"%d\\n\", a[-1][+1]);
}
main()
{
             print(x);
}
  • 8, -12, 7, 23, 8

  • 8, 8, 7, 23, 7

  • -12, -12, 27, -31, 23

  • -12, -12, 27, -31, 56

There are 86 questions to complete.

Last Updated :
Take a part in the ongoing discussion