GATE-CS-2000 (original) (raw)

The following C declarations

C `

struct node { int i; float j; }; struct node *s[10] ;

`

define s to be

Which of the following need not necessarily be saved on a context switch between processes?

Suppose the time to service a page fault is on the average 10 milliseconds, while a memory access takes 1 microsecond. Then a 99.99% hit ratio results in average memory access time of

The value of j at the end of the execution of the following C program.

C `

int incr(int i) { static int count = 0; count = count + i; return (count); } main() { int i,j; for (i = 0; i <=4; i++) j = incr(i); }

`

A graphics card has on board memory of 1 MB. Which of the following modes can the card not support?

An n x n array v is defined as follows:

v[i, j] = i-j for all i, j, 1 <= i <= n, 1 <= j <= n

The sum of the elements of the array v is

X, Y and Z are closed intervals of unit length on the real line. The overlap of X and Y is half a unit. The overlap of Y and Z is also half a unit. Let the overlap of X and Z be k units. Which of the following is true?

Suppose you are given an array s[1..n] and a procedure reverse (s, i, j) which reverses the order of elements in a between positions i and j (both inclusive). What does the following sequence do, where 1 <= k <= n:

reverse(s, 1, k) ;
reverse(s, k + 1, n);
reverse(s, l, n);

Let G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be the first new (unvisited) vertex visited after visiting u in the traversal. Which of the following statements is always true?

Given the following relation instance.

x y z
1 4 2
1 5 3
1 6 3
3 2 2

Which of the following functional dependencies are satisfied by the instance? (GATE CS 2000)

There are 49 questions to complete.

Take a part in the ongoing discussion