1.

What is new operator in C++? Give example.

Answer»

The new operator in C++ allocates memory dynamically. 

Syntax: 

pointervariable = new datatype; 

Example: ptr = new int;



Discussion

No Comment Found

Related InterviewSolutions