(This question has been asked in GU Uni Dec 2018 for 7 Mark) Friend Functions Non-member function which is declared as a friend of particular class can have access to private data members of that class, in which it is
What is a constructor? Explain the characteristics of it in detail.
(This question has been asked in GU Uni Dec 2018 for 7 Mark) A constructor is a member function of a class, whose name is the same as the class name. A constructor is automatically called when an object of
Write a short note on Function Overloading in C++
(This question has been asked in GU Uni Dec 2018 for 7 Mark) In C++, two functions can have the same name if the number and/or type of arguments passed is different. These functions having the same name but different
Write Short notes on Default Arguments in C++.
(This question has been asked in GU Uni Dec 2018 for 7 Mark) A default argument is a value provided in a function declaration that is automatically assigned by the compiler if the caller of the function doesn’t provide a
How to define the Function outside the class body? Explain with an example.
(This question has been asked in GU Uni Dec 2018 for 7 Mark) SCOPE RESOLUTION OPERATOR ( :: ) With the help of the Scope Resolution Operator, we can define the public member function outside of the class body. To
What is an Arrow Operator? Explain with an example.
(This question has been asked in GU Uni Dec 2018 for 7 Mark) The -> (arrow) operator is used to access structure or C++ class members using a pointer. The dot and arrow operator are both used in C++ to