InterviewSolution
 Saved Bookmarks
    				| 1. | 
                                    Answer the question (i) to (v) after going through the following class.classBook{intBookCode ; char Bookname[20];float fees; public:Book() //Function 1{fees = 1000;BookCode = 1;strcpy (Bookname, “C++”);}void display(float C) //Function 2{cout << BookCode << “:”<< Bookname << “:”<< fees << endl;~ Book() //Function 3{cout << “End of Book Object”<< endl;}Book (intSC, char S[ ], float F); //Function 4};1. In the above program, what are Function 1 and Function 4 combined together referred as?2. Which concept is illustrated by Function3? When is this function called/ invoked?3. What is the use of Function3?4. Write the statements in main to invoke functionl and function25. Write the definition for Function4. | 
                            
| 
                                   
Answer»  1. Constructor overloading (function 1 and function 4 are constructors with different signatures in the class book) 2. Function 3 is destructor of the class. Function 3 is executed when the object of the class book goes out of scope. 3. Function 3 is destructor of the class. 
 5. Book: :Book (int sc.char.s[], float, F) // Function 4 { Book Code = SC strcpy (Book name, S); fees = F; }  | 
                            |