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

Define and explain about ! Operator?

611


What is the use of the function in c?

594


Is boolean a datatype in c?

540


Explain pointer. What are function pointers in C?

623


What is the significance of scope resolution operator?

851






What are multidimensional arrays?

656


What is the best way of making my program efficient?

561


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

725


Apart from dennis ritchie who the other person who contributed in design of c language.

801


Explain what are compound statements?

599


What is queue in c?

574


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

613


What are different types of operators?

592


Write a program to check palindrome number in c programming?

596


Is c is a low level language?

558