14 pagesInterview Quetions - C 1 2 3 4 5 6 7 8 9 10 11 12...

Info icon This preview shows pages 1–3. Sign up to view the full content.

C++ 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 class and structure? 5. What is public, protected, private? 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 R T T I ? 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 inheritance? 31. What are the advantages of inheritance? 32. When is a memory allocated to a class? 33. What is the difference between declaration and definition? 34. What is virtual constructors/destructors? 35. In c++ there is only virtual destructors, 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. 41. How do you link a C++ program to C functions? 42. Explain the scope resolution operator. 43. What are the differences between a C++ struct and C++ class? 44. How many ways are there to initialize an int with a constant? 45. How does throwing and catching exceptions differ from using setjmp and longjmp? 46. What is a default constructor? 47. What is a conversion constructor? 48. What is the difference between a copy constructor and an overloaded assignment operator? 49. When should you use multiple inheritance? 50. What is a virtual destructor? 51. Explain the ISA and HASA class relationships. How would you implement each in a class design? 52. When is a template a better solution than a base class? 53. What is a mutable member? 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

C++ 54. What is an explicit constructor? 55. What is the Standard Template Library? 56. Describe run-time type identification. 57. What problem does the namespace feature solve? 58. Write a function of factorial 59. Use recursion to write a function of factorial. 60. Write a function that reverse the words in the sentence ,for example "This is a string " becomes "string a is This".
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern