Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / sethuu

First output will print some garbage value because you
delete the object p and the you print.

The second one will print value 60.

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1099


Write a program of advanced Fibonacci series.

1155


Explain the term printf() and scanf() used in c language?

1054


What does calloc stand for?

1168


Process by which one bit pattern in to another by bit wise operation is?

1170


What is the difference between exit() and _exit() function?

1048


Is it possible to have a function as a parameter in another function?

1082


given post order,in order construct the corresponding binary tree

2792


How can my program discover the complete pathname to the executable from which it was invoked?

1079


What is the difference between near, far and huge pointers?

1099


Are local variables initialized to zero by default in c?

1053


Write a program to print fibonacci series without using recursion?

1146


What are the different types of C instructions?

1320


How can I read in an object file and jump to locations in it?

1034


What is meant by int main ()?

1213