UGC NET Previous Years Solution: Computer Science and Application Questions with Answers for 2008 December Paper II - Q.25 - Q.36


Computer Science and Application UGC-NET 2008 December Paper II - Q.25 - Q.36
25. Which one of the following correctly describes a static variable:
(A). It cannot be initialized.
(B). It is initialized once at the commencement of execution and cannot be changed during run time.
(C ). It retains its value during the life of the program.
(D). None of the above
Ans: C

26. The output of the program code
main()
{
int x = 0;
while ( x < = 10)
for(;;)
if (++x%10==0)
break;
printf(“x=%d”,x);
}
is:
(A). x = 1        (B). compilation error

(C ). x = 20      (D) none of the above

Ans: C.

27. A copy constructor is invoked when :

(A). a function returns by value (B). an argument is passed by value

(C ). A function returns by reference (D). none of the above

Ans: B

28. When a language has the capability to produce new data types, it is said to be :

(A). extensible (B). encapsulated

 (C ). Overloaded (D). none of the above

Ans:A

29. How many constructors can a class have?

(A) Zero          (B) 1

(C ) 2              (D) any number

Ans:- D

30. An entity has: (i) a set of properties (ii) a set of properties and values for all the properties (iii) a set of properties and the values for some set of properties may non-uniquely identify an entity (iv) a set of properties and the values for some set of properties may uniquely identify an entity Which of the above are valid?

 (A) (i) only     (B) (ii) only

(C ) (iii) only   (D) (iv) only

Ans: D

31. Aggregation is:

(A) An abstraction through which relationships are treated as lower level entities

(B) An abstraction through which relationships are treated as higher level entities

(C) An abstraction through which relationships are not treated at all as entities

(D) None of the above

Ans: B

32. Suppose R is a relation schema and F is a set of functional dependencies on R. Further, suppose R1 and R2 forma a decomposition of R. Then the decomposition is a lossless join decomposition of R provided that :

(A) R1∩R2 ->R1 is in F+
(B) R1 ∩ R2->R2 is in F+
(C) Both R1 ∩ R2->R1 and R1 ∩ R2->R3 functional dependencies are in F+
(D)At least one from R1∩R2->R1 and R1 ∩ R2->R2 is in F+
Ans: D.

33. In a heap, every element is ________________ of all the elements in the subtree.
(A) Maximum (B) minimum
(C ) sum (D) product
Ans: A

34. If (rear == maxsize – 1) rear=0; else rear=rear+1; is required in :
(A) circular queue       (B) linear queue

(C) stack                      (D) deque
Ans: D

35. A high performance switching and multiplexing technology that utilizes fixed length packets to carry different types of traffic is :
(A) ATM         (B) ADSL

(C) SONET     (D) None of the above
Ans: A


36. A conventional LAN bridge specifies only the functions of OSI:
(A) Layers 1 and 2      (B) layers 1 through 3

(C) all layers                (D) none of the above
Ans: A.