Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Technical Discussion :: C++

8. Explain overloading the delete operator.

Answer:

Syntax:

void operator delete(void *p)
{
/*free memory pointed to by p. the destructor is called automatically.*/
}

The delete function receives a pointer to the region of memory to be freed. It then releases the previously allocated memory back to the system. When an object is deleted, its destructor is automatically called.

Asked In :: TCS Societe Generale

Post Your Answer Here:

Name *
Email
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here