⟩ What is Synchronous Exceptions?
Errors that occur due to incorrect input data or incorrect handling of array indices (“out of range index”), memory overflow are known as Synchronous Exceptions
Errors that occur due to incorrect input data or incorrect handling of array indices (“out of range index”), memory overflow are known as Synchronous Exceptions
If inner catch handler is not able to handle the exception then__________. a. Compiler will look for outer try handler b. Program terminates abnormally c. Compiler will check for appropriate catch handler of outer try block d. None of these
What are the advantages of using friend classes?
Explain advantages of using friend classes?
What is a friend function?
Explain the characteristics of friend functions?
Explain friend function?
What are friend classes?
What is the output of this program? #include <iostream> using namespace std; class Box { double width; public friend void printWidth( Box box ); void setWidth( double wid ); }; void BoxsetWidth( double wid ) { width = wid; } void printWidth( Box box ) { box.width = box.width * 2; cout << "Width of box " << box.width << endl; } int main( ) { Box box; box.setWidth(10.0); printWidth( box ); return 0; } a) 40 b) 5 c) 10 d) 20
Which keyword is used to declare the friend function? a) firend b) friend c) classfriend d) myfriend
Which rule will not affect the friend function? a) private and protected members of a class cannot be accessed from outside b) private and protected member can be accessed anywhere c) both a & b d) None of the mentioned