Object Oriented Programming Using C++ Viva Questions Coders Lodge
Object Oriented Programming Using C++ Viva Questions Coders Lodge
USING C++
Connect with us
• If you want to join our WhatsApp community then mail us at:-
[email protected] with your preferred branch(with year) and
college name.
• Join our Telegram group:- https://t.me/coderslodgeofficial
• Like our Facebook page :- https://www.facebook.com/coderslodge
• Follow us on Instagram:-https://www.instagram.com/coderslodge/
• Follow us on Twitter:- https://twitter.com/CodersLodge
• Follow us on Linkedin:- https://www.linkedin.com/company/coderslodge
2. What is an object?
An instance of the class is called as object.
3. Explain what is the use of void main () in C++ language?
To run the C++ application it involves two steps, the first step is
a compilation where conversion of C++ code to object code
take place. While second step includes linking, where
combining of object code from the programmer and from
libraries takes place. This function is operated by main () in C++
language.
4. Explain what is Member Functions in Classes?
The member function regulates the behaviour of the class. It
provides a definition for supporting various operations on data
held in the form of an object.
5. What is namespace std; and what is consists of?
Namespace std; defines your standard C++ library, it consists of
classes, objects and functions of the standard C++ library. You
can specify the library by using namespace std or std: :
throughout the code. Namespace is used to differentiate the
same functions in a library by defining the name.
6. Explain how functions are classified in C++ ?
In C++ functions are classified as
• Return type
Kindly share your valuable feedback on
[email protected]
• Function Name
• Parameters
• Function body
7. What is inheritance?
Inheritance is the process of acquiring the properties of the
exiting class into the new class. The existing class is called as
base/parent class and the inherited class is called as
derived/child class.
8. What is an inline function?
A function prefixed with the keyword inline before the function
definition is called as inline function. The inline functions are
faster in execution when compared to normal functions as the
compiler treats inline functions as macros.
9. Explain what is a reference variable in C++?
A reference variable is just like a pointer with few differences. It
is declared using & Operator. In other words, reference is
another name for an already existing variable.
10.Explain what is Polymorphism in C++?
Polymorphism in C++ is the ability to call different functions by
using only one type of the function call. Polymorphism is
referred to codes, operations or objects that behave differently
in a different context.
11.Explain what is C++ exceptional handling?
The problem that arises during execution of a program is
referred as exceptional handling. The exceptional handling in
C++ is done by three keywords.