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

What is array within structure?

1098


What is 1d array in c?

1065


What are reserved words?

1087


What is the advantage of a random access file?

1185


What is function prototype in c language?

1017


What is the difference between struct and typedef struct in c?

1114


What is the function of this pointer?

1307


What are c identifiers?

1075


What is union and structure in c?

1202


Why we use int main and void main?

1063


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2111


What is p in text message?

963


What is volatile variable in c?

1076


What is the best way of making my program efficient?

1012


Why is structure important for a child?

1083