UGC NET Computer Science Solved Question Paper II June 2006 - Part 2

11.       What is the output of the following program segment ?
main()
{
int count, digit=0;
count=1;
while(digit<=9){
printf(“%d\n”,++count); ++digit;}
}
(A) 10
(B) 9
(C) 12
(D) 11
Answer: D
12.       A static variable is one:
(A) Which cannot be initialized
(B) Which is initialized once at the commencement of execution and cannot be changed at runtime
(C) Which retains its value throughout the life of the program
(D) Which is the same as an automatic variable but is placed at the head of a program
Answer: C
13.       If the following loop is implemented
    {
int num=0;
do{--num; printf(“%d”, num); num++;}
while(num>=0)
}
(A) the loop will run infinitely many times
(B) the program will not enter the loop
(C) there will be compilation error reported
(D) a run time error will be reported
Answer: C
14.       #define max(x,y) x=(x>y)?x:y is a macro definition, which can find the maximum of two numbers x and y if:
(A) x and y are both integers only
(B) x and y are both declared as float only
(C) x and y are both declared as double only
(D) x and y are both integers, float or double
Answer: D
15.       The function sprint() works like printf(), but operates on:
(A) Data in a file
(B) stdrr
(C) stdin
(D) string
Answer: D

16.       A relation R = {A, B, C, D, E, F} is given with following set of functional dependencies:
F = {A→B, AD→C, B→F, A→E}
Which of the following is candidate key ?
(A) A
(B) AC
(C) AD
(D) None of these
Answer: C
17.       Immediate updates as a recovery protocol is preferable, when:
(A) Database reads more than writes
(B) Writes are more than reads
(C) It does not matter as it is good in both the situations
(D) There are only writes
Answer: B
18.       Which of the following statement is wrong ?
(A) 2-phase locking protocol suffers from deadlocks
(B) Time-Stamp protocol suffers from more abort
(C) Time stamp protocol suffers from cascading rollbacks where as 2-phase locking protocol do not
(D) None of these
Answer: C
19.       Which data management language component enabled the DBA to define the schema components?
(A) DML
(B) Subschema DLL
(C) Schema DLL
(D) All of these
Answer: C
20.    A subclass having more than one super class is called .................
(A) Category                
(B) Classification
(C) Combination         
(D) Partial Participation
Answer: A

Pages   2   3   4   5 

Post a Comment

0 Comments