Monday, May 18, 2015



C++ questions:

13.What is copy constructor and a default constructor and write a copy constructor and explain shallow copy with memory diagram.
14.Is it necessary to have const for a reference in copy constructor
15.Explain the stack over flow condition when pass by value is done in copy constructor.
16.Memory layout of a program and explain the different segements when a function call happen.
17. Explain the difference between static variable and local variable
18. what are the different storage classes present and explain the differnces between them.
19.Polymorphism and virtual concepts
20.Why a virtual destructor is needed explain with a scenario what happens when a virtual destructor is not defined.
21.What is a smart pointer and why it is needed?
22.Difference between smart pointer and auto pointer and write the code for autp ptr implementation.
23.exception handling in c++
24.what is stack unwinding?
25.Difefrence between vector and list.
26.Templates and function templates.
27.what is operator overloading  ? implememt how to overload ++ operator and "insertion" operator.
28. What is memory leak and memory corruption and explain the scenario for memory leaks and memory corruption with a sample code.
29.What is factory pattern? why factory pattern is needed?
30.What is builder pattern pattern ? write a sample code for the same.
31.What is a singleton pattern and write the code for the same.
32. How can you retain the values of a local variable without using a  static variable.
33.What happens when a function is made inline?
34. why inline functions are needed and in what scenario the inlines are needed?

35..Find the first non repeated value in the array by iterating only once.

No comments:

Post a Comment