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

write a program to copy the string using switch case?

2949


Was 2000 a leap year?

1090


What is dynamic memory allocation?

1390


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1787


What is pointer and structure in c?

1279


What is property type c?

1136


How does selection sort work in c?

1099


Do variables need to be initialized?

1111


Is main a keyword in c?

1183


write a progrmm in c language take user interface generate table using for loop?

2103


Subtract Two Number Without Using Subtraction Operator

906


Are there constructors in c?

1060


Can a pointer point to null?

1120


What is the symbol indicated the c-preprocessor?

1318


What are the types of data structures in c?

1212