Use Of new and delete Operator in C++

When we are allocating the
int *var = new int ;
then var will have garbage value or 0 ?

hey @vidyajaykushwaha, it depends upon compiler to compiler. In most of the latest compiler, it is 0.

hey @vidyajaykushwaha , if no further query,please mark this doubt as resolved.

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.