Explain dangling pointer.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

write a program that takes two numbers from user that prints the smallest number

2 Answers  


How the delete operator differs from the delete[]operator?

0 Answers  


What is binary object model?

0 Answers  


What is string in c++ programming?

0 Answers  


Can constructor be private in c++?

0 Answers  






class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData

2 Answers   Quark,


Can we declare destructor as static? Explain?

3 Answers  


Explain what are the sizes and ranges of the basic c++ data types?

0 Answers  


Explain differences between alloc() and free()?

0 Answers  


How many storage classes are available in C++?

1 Answers  


Why is main function important?

0 Answers  


What is constructor in C++?

0 Answers  


Categories