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
write a program to copy the string using switch case?
Was 2000 a leap year?
What is dynamic memory allocation?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
What is pointer and structure in c?
What is property type c?
How does selection sort work in c?
Do variables need to be initialized?
Is main a keyword in c?
write a progrmm in c language take user interface generate table using for loop?
Subtract Two Number Without Using Subtraction Operator
Are there constructors in c?
Can a pointer point to null?
What is the symbol indicated the c-preprocessor?
What are the types of data structures in c?