Saturday, February 20, 2010

C++ INTERVIEW QUESTION

1.What is a class?

2.What is an object?

3.What is the difference between an object and a
class?

4.What is the difference between a class and a
structure?

5.What is public, private, protected?

6.What are virtual functions?

7.What is friend function?

8.What is a scope resolution operator?

9.What do you mean by inheritance?

10.What is abstraction?

11.What is polymorphism? Explain with an example?

12.What is encapsulation?

13.What do you mean by binding of data and functions?

14.What is function overloading and operator
overloading?

15.What is virtual class and friend class?

16.What do you mean by inline function?

17.What do you mean by public, private, protected and
friendly?

18.When is an object created and what is its lifetime?

19.What do you mean by multiple inheritance and
multilevel inheritance? Differentiate between them?

20.Difference between realloc() and free?

21.What is a template?

22.What are the main differences between procedure
oriented languages and object oriented languages?

23.What is RTTI?

24.What are generic functions and generic classes?

25.What is namespace?

26.What is the difference between pass by reference
and pass by value?

27.Why do we use virtual functions?

28.What do you mean by pure virtual functions?

29.What are virtual classes?

30.Does C++ support multilevel and multiple
inheritances?

31.What are the advantages of inheritance?

32.When ia memory allocated to a class?

33.What is the difference between declaration and
definition?

34.What are virtual constructors/destructors?

35.In C++ there is only virtual destructor, no
constructors. Why?

36.What is late bound function call and early bound
function call? Differentiate?

37.How is exception handling carried out in C++?

38.When will a constructor executed?

39.What is dynamic polymorphism?

40.Write a macro for swapping integers?

2 comments: