When can you tell that a memory leak will occur?
Answer / harendra pal
A memory leak occurs when a program loses the ability to free a block of dynamically allocated memory.
Is This Answer Correct ? | 0 Yes | 0 No |
Is it possible to use a new for the reallocation of pointers ?
What is slicing?
Why is c++ is better than c?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
difference between macro and function?
What is a c++ vector?
Is empty stack c++?
how to connect with oracle 9i with server in socket program in c/c++
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
Describe linkages and types of linkages?
What is polymorphism and its type in c++?
What is a storage class used in c++?