Database-Management-System
August 21, 2024UGC NET CS 2009 Dec-Paper-2
Question 15 |
Which of the statements are true?
I. Function overloading is done at compile time.
II. Protected members are accessible to the member of derived class.
III. A derived class inherits constructors and destructors.
IV. A friend function can be called like a normal function.
V. Nested class is a derived class.
I. Function overloading is done at compile time.
II. Protected members are accessible to the member of derived class.
III. A derived class inherits constructors and destructors.
IV. A friend function can be called like a normal function.
V. Nested class is a derived class.
I, II, III | |
II, III, V | |
III, IV, V | |
I, II, IV |
Question 15 Explanation:
FALSE: Function overloading is done at run time.
TRUE: Protected members are accessible to the member of derived class.
TRUE: A derived class inherits constructors and destructors.
FALSE: 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.
TRUE: Nested class is a derived class.
TRUE: Protected members are accessible to the member of derived class.
TRUE: A derived class inherits constructors and destructors.
FALSE: 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.
TRUE: Nested class is a derived class.
Correct Answer: B
Question 15 Explanation:
FALSE: Function overloading is done at run time.
TRUE: Protected members are accessible to the member of derived class.
TRUE: A derived class inherits constructors and destructors.
FALSE: 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.
TRUE: Nested class is a derived class.
TRUE: Protected members are accessible to the member of derived class.
TRUE: A derived class inherits constructors and destructors.
FALSE: 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.
TRUE: Nested class is a derived class.
Subscribe
Login
0 Comments