⟩ Explain terminate() function?
terminate() is a library function which by default aborts the program
It is called whenever the exception handling mechanism cannot find a handler for a thrown exception.
terminate() is a library function which by default aborts the program
It is called whenever the exception handling mechanism cannot find a handler for a thrown exception.
What is output of this program? #include <iostream> using namespace std; class sample { private int a, b; public void test() { a = 100; b = 200; } friend int compute(sample e1); }; int compute(sample e1) { return int(e1.a + e1.b) - 5; } int main() { sample e; e.test(); cout << compute(e); return 0; } a) 100 b) 200 c) 300 d) 295
What is the friend class in C++?
What is the syntax of friend function? a) friend class1 Class2; b) friend class; c) friend class d) None of the mentioned
Pick out the correct statement. a) A friend function may be a member of another class. b) A friend function may not be a member of another class. c) A friend function may or may not be a member of another class. d) None of the mentioned
List the characteristics of friend functions?
Explain the advantages of inheritance?
How to implement inheritance in C++?
What is a base class?
Explain protected inheritance?
Do you know what is Protected Inheritance?