Below is the difference between constructor and member function in C++ programming. 1) Constructor name must be same as the class name, but functions cannot
Author: rsingh
C++ Interview Question Description: Describe the concept to prevent heap allocation in C++ for a class i.e. object creation on heap. Means, dynamic memory allocation
Answers contains the size of empty class in C++ with virtual function (4 or 8 bytes) and without virtual function (1 byte not 0 )
Difference between new and malloc in C++ – The answer of interview question C++ malloc vs new heap memory allocation includes advantages of new operator over
Answer: Singleton class in C++ is the class that is designed to provide only one unique instance across the system. So, whenever we create c++
Answer: The this pointer in C++ is a constant pointer that stores address of an object of a class. The type of this pointer is
Answer:To delete singleton instance or object in C++ programs, we need to follow a proper design to delete singleton object in the class . Especially,
Answer: new and free in c++ should never be mixed or else we may get memory leak issues and resource leak issues and may take
Answer: Bind() function in socket programming is used to associate the socket with local address i.e. IP Address, port and address family. int bind(int sockfd,struct
Answer: The answer is up to you if you have used UDP socket programming in your project. If you have not used in your project