Describe delete operator?



Describe delete operator?..

Answer / Gaurav Kumar Shah

In C++, the delete operator is used to deallocate memory that was previously allocated using new or malloc. It frees up the memory associated with a pointer variable and nullifies the pointer. If the object being deleted has a non-trivial destructor, it will be called before the memory is actually freed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are function poinetrs? where are they used?

1 Answers   CTS,


Write a program that will count the number of digits in an input integer up to value MAX_VALUE (2147483647). Thus, for an input of 5837 the output should be 4 digits Make sure that your program works for the numbers 0, 1, and 10. For the number 0, the output should be 1 digit

2 Answers  


What are virtual functions and what is its use?

1 Answers  


What is the best c++ ide?

1 Answers  


How to defines the function in c++?

1 Answers  


Program to check whether a word is a sub-string or not of a string typed

1 Answers  


Write a program to find the reverse Fibonacci series starting from N.

1 Answers   Huawei,


What is a try block?

1 Answers  


What is polymorphism in c++? Explain with an example?

1 Answers  


What do you mean by translation unit in c++?

2 Answers  


What sorting algorithm does c++ use?

1 Answers  


How size of a class can be calulated?

2 Answers  


Categories