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 / anu

I think error will come bcoz memory allocated to *P is
already deleted d it will point to nowhere now....

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i have a written test for microland please give me test pattern

2668


Differentiate between static and dynamic modeling.

1055


How is a pointer variable declared?

1027


How many levels of pointers can you have?

1137


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2044


What are the basic data types associated with c?

1223


What is #include stdio h?

1064


How can you increase the allowable number of simultaneously open files?

1093


How are variables declared in c?

1032


If you know then define #pragma?

1057


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1818


a c code by using memory allocation for add ,multiply of sprase matrixes

2748


What is the use of typedef in structure in c?

919


Differentiate between null and void pointers.

1120


What is the use of sizeof?

970