int main()
{
int *p=new int;
*p=10;
del p;
cout<<*p;
*p= 60;
cout<<*p;
}
what will be the output & why?

Answer Posted / hemang

There will be error because del is used instead of delete. in c++ delete is the keyword not del. delete is used to delete an object.

So program will not run....

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is getche() function?

609


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

630


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

614


Why is c called "mother" language?

857


Is python a c language?

552






Do you have any idea how to compare array with pointer in c?

604


code for quick sort?

1622


What is #include stdio h and #include conio h?

603


Where is volatile variable stored?

650


How do you search data in a data file using random access method?

833


application attempts to perform an operation?

1495


Why is void main used?

621


Why do we use pointer to pointer in c?

599


Write a C program to count the number of email on text

1420


Which header file is essential for using strcmp function?

945