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

In a byte, what is the maximum decimal number that you can accommodate?

1072


What are the complete rules for header file searching?

1030


What are bitwise shift operators in c programming?

1038


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1450


Explain what is meant by 'bit masking'?

1120


Differentiate between a structure and a union.

1227


What is the need of structure in c?

1050


What does double pointer mean in c?

1077


Can a pointer be volatile in c?

931


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3915


Are local variables initialized to zero by default in c?

984


What is a keyword?

1122


write a program to display all prime numbers

1912


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2023


What is the best way to store flag values in a program?

1010