Deallocation of memory

bhaiya the syntax for deallocating dynamically allocated array is delete[ ] p (suppose p is the pointer to the array). But i use it like delete p; i did not get any error rather it is working fine. Why?

hi @ritikbunty2511_729d0258992e0982 wo pointer delete ho gyi as such no issues

mtlb array ko delete karne ke liye delete[] arr or delete arr dono ka use kar sakte hai dono same he hai

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.