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
What is array within structure?
What is 1d array in c?
What are reserved words?
What is the advantage of a random access file?
What is function prototype in c language?
What is the difference between struct and typedef struct in c?
What is the function of this pointer?
What are c identifiers?
What is union and structure in c?
Why we use int main and void main?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
What is p in text message?
What is volatile variable in c?
What is the best way of making my program efficient?
Why is structure important for a child?