# UGC NET COMPUTER SCIENCE SOLVED PAPERS 2014-16 - UGC NET Computer Science Paper 2 JULY 2016

>>>>>>>>UGC NET Computer Science Paper 2 JULY 2016

• Option : C
• Explanation :
= x * y < i + j || k
= 0.5 * 0.0 < 0 + 1 || -1
= 0.0 < 0 + 1 || -1
= 0.0 < 1 || -1
= 1 || -1
= 1
So, option (C) is correct.

• Option : A
• Explanation :
int (*f())[ ]; declares a function returning a pointer to an array of integers.

• Option : B
• Explanation :
• When a class grants friend status to another class then all member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship.
• The member functions of the class generating friendship can access the members of the friend class.Incorrect statement.
• Class friendship is not reciprocal to each other.
• So, option (B) is correct.

• Option : D
• Explanation :
• When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass overrides the method in the superclass.
• Overloading allows different methods to have same name, but different signatures where signature can differ by number of input parameters or type of input parameters or both. Overloading is related to compile time (or static) polymorphism..
• Friend Class A friend class can access private and protected members of other class in which it is declared as friend..
• The capability of a class to derive properties and characteristics from another class is called Inheritance.
• So, option (D) is correct.

• Option : A
• Explanation :
We have function:
int f (int n)
{ if (n = = 0) then return n;
else
return n + f(n-2);
}
we have to find output for n = 100 i.e int f (100) { if (n = = 0) then return n; //failure// else return 100 + f (98) { if (n = = 0) then return n; //failure// else return 98 + f (96) { if (n = = 0) then return n; //failure// else return 96 + f (94).......................f(0);// It will be a AP series of 100 , 98, 96,.........0// ; }; }; } Sum of series when we know first and last term and no of terms: Sn = n / 2 * (first term + last term) i.e. 51 / 2 * (100 + 0). = 51 * 50 = 2550. So, option (A) is correct.