Computer Science - Sample Paper
can have. Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes,
and the block size is 512 bytes. What is the order of the internal node?
A) 24
B) 25
C) 26
D) 27
Answer: (C)
2) In an MxN matrix such that all non-zero entries are covered in a rows and b columns.
Then the maximum number of non-zero entries, such that no two are on the same row or
column, is
A) £ a + b
B) £ max {a, b}
C) £ min {M-a, N-b}
D) £ min {a, b}
Answer: (A)
3) A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The levelorder
traversal of the heap is given below: 10, 8,5,3,2 Two new elements 1 and 7 are
inserted in the heap in that order. The level-order traversal of the heap after the insertion
of the elements is
A) 10,8,7,5,3,2,1
B) 10,8,7,2,3,1,5
C) 10,8,7,1,2,3,5
D) 10,8,7,3,2,1,5
Answer: (D)
4) The relation scheme Student Performance (name, courseNo, rollNo, grade) has the
following functional dependencies:
A) name, courseNo -> grade
B) rollNo, courseNo -> grade
C) name -> rollNo
D) rollNo -> name
The highest normal form of this relation scheme is
Answer: (A)
5) Let G be a simple graph with 20 vertices and 100 edges. The size of the minimum vertex
cover of G is 8. Then, the size of the maximum independent set of G is
A) 12
B) 8
C) Less than 8
D) More than 12
Answer: (A)
6) The minimum number of page frames that must be allocated to a running process in a
virtual memory environment is determined by
A) the instruction set architecture
B) page size
C) physical memory size
D) number of processes in memory
Answer: (D)
x = m;
y-i;
while (x - y > Î)
{ x = (x + y) / 2 ;
y = m/x ;
}
print (x) ;
A) log m
B) m2
C) m1/2
D) m1/3
Answer: (C)
8) Consider the following C program
main ()
{ int x, y, m, n ;
scanf ("%d %d", &x, &y);
/ * Assume x > 0 and y > 0 * /
m = x; n = y ;
while ( m ! = n)
{ if (m > n)
m = m — n;
else
n = n - m ; }
printf("%d",n); }
The program computes
A) x + y, using repeated subtraction
B) x mod y using repeated subtraction
C) the greatest common divisor of x and y
D) the least common multiple of x and y
Answer: (C)
9) The best data structure to check whether an arithmetic expression has balanced
parentheses is a
A) queue
B) stack
C) tree
D) list
Answer: (B)
10) The Boolean function x, y, + xy + x, y
A) x, + y,
B) x + y
C) x + y,
D) x, + y
Answer: (D)
No comments:
Post a Comment