Wednesday, May 3, 2017

C++ Viva/Practical Important Questions

1. What is C++?
a. C++ is a general purpose object oriented programming language invented in 1980s by stroutrup.

2. What is Class?
a. A class can be declared as a collection of data members along with members function which allows association of data and function into a single unit called encapsulation.

3. What are different features of C++?
a. Operators and function overloading,     Free storage management, Constant types,  References,    
    Inline functions, Virtual function, Templates, Exception handling.

4. Explain constructor?
a. Constructors is a member function having the same name as that of its class and is expected automatically when the class is initiated.

5.What is a function?
a. A function is a block of code which executes the statements when we call it .

6. Explain function?
a. Inline function are those function whose function body is inserted in place of the function call.

7. What is function overloading?
a. Function polymorphism for function overloading is a concept that allows multiple function to share the same name with different argument type assigning one or more function body to the same name is known as function overloading.

8. What is implicit and explicit type conversion?
a. In implicit casting in C++ compile automatically handle the type conversion. In Explicit conversion of data type of two operand is not automatic but forced.

9.  What is inheritance in C++?
a. Inheritance is a technique of organizing information in a hierarchy form.

10. What is Polymorphism?
a. Polymorphism means one name, multiple forms.

11. Explain encapsulation.
a. The wrapping up of data and functions into a single unit is encapsulation,

12.What are tokens in C++?
a. The smallest individuals units of a program is known as tokens.

13. Difference between C and  C++.
a. C is a super set of C++. C cant support inheritance, function overloading, etc but in C++ it can be done. In c program the main function could not return a value but in C++ the main function should return a value.

14. Explain Destructors.
a. A destructor is called for a class object when that object pases out of scope or is explicily deleted.


2 comments:

  1. Congratulation for the great post. Those who come to read your Information will find lots of helpful and informative tips. Tatcha Eye Cream

    ReplyDelete
  2. Thank you for posting such a great blog. I found your website perfect for my needs. Read About UCAT 2021

    ReplyDelete

May I Help you