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.
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.
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.