...
Database-Management-System
August 21, 2024
Database-Management-System
August 21, 2024

UGC 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.
A
I, II, III
B
II, III, V
C
III, IV, V
D
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.
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.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!