OOPS-concepts

Question 1
Which of the following is not a member of class ?
A
Static function
B
Friend function
C
Const function
D
Virtual function
       C++       OOps-concepts       UGC NET CS 2014 Dec-Paper-2
Question 1 Explanation: 
A friend function of a class is defined outside that class scope but it has the right to access all private and protected members of the class. Even though the prototypes for friend functions appear in the class definition, friends are not member functions.
1. A function can only be declared a friend by a class itself.
2. It can have access to all members of the class, even private ones.
Question 2
Which of the following differentiates between overloaded functions and overridden functions ?
A
Overloading is a dynamic or runtime binding and overridden is a static or compile time binding.
B
Overloading is a static or compile time binding and overriding is dynamic or runtime binding.
C
Redefining a function in a friend class is called overloading, while redefining a function in a derived class is called as overridden function.
D
Redefining a function in a derived class is called function overloading, while redefining a function in a friend class is called function overriding.
       OOPS       OOPS-concepts       UGC NET CS 2014 Dec-Paper-2
Question 2 Explanation: 
There are 2 questions to complete.
PHP Code Snippets Powered By : XYZScripts.com
error: Content is protected !!