Feel free to ask or give answer of any question in comments.

Tuesday, October 7, 2008

Recently asked C++ interview questions

  1. Why do we need to write Copy constructor when compiler provides a default Copy constructor?
  2. What is conversion constructor?
  3. What is difference between structure and class ?
  4. Difference between stack and heap in terms of declared variables?
  5. What are the advantages of new and delete over malloc and free?
  6. What are differnt casting availble in C++ ?
  7. What is upcasting and why upcasting is implicit in C++?
  8. what happens to the memory alloted after the exception is raised???
  9. How to declare a constant pointer and a pointer to constant variable
  10. Describe how runtime polymorphism is achieved by the compliler?
  11. explain the syntax (int* &i).
  12. if we declare a class without any member variable and with out any function then what could be the size of such class ? Now if we declare only virtual function then what would be the size?
  13. what is a register?
  14. What is mutable data?
  15. We have integer array which is having repeated entries i.e. arr[] = {1,2,2,2,3,3,4,5,5,6,4,1} Write an optimum code to get the unique value?
  16. Write the code to insert a node in sorted doubly linked list
  17. Write your own printf() function?
  18. What is a conversion operator?
  19. Take the example of traffic and explain polymorphism ( not in C++ terminology)

1 comments:

TestingInterviewQuestions said...

I would like to thank my co-author Mr. Anuj for his invaluable support. This post is written by him and here he shared his experience of recently attended interviews.

Thanks,
Sumit

Favorite test automation tool?