Which command properly allocates memory
a) char *a=new char[20];
b) char a=new char[20];
c) char a=new char(20.0);
No Answer is Posted For this Question
Be the First to Post Answer
How can you quickly find the number of elements stored in a dynamic array?
What is a class template in c++?
Explain deep copy?
What is c++ stringstream?
What is istream and ostream in c++?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
Is nan a c++?
Is C++ case sensitive a) False b) Depends on implementation c) True
What are the differences between the function prototype and the function defi-nition?
What is function overriding in c++?
Write a C++ program to sort digits of all the 4 digit number and display the sorted 4 digit number
In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest.