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
i have a written test for microland please give me test pattern
Differentiate between static and dynamic modeling.
How is a pointer variable declared?
How many levels of pointers can you have?
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.
What are the basic data types associated with c?
What is #include stdio h?
How can you increase the allowable number of simultaneously open files?
How are variables declared in c?
If you know then define #pragma?
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);
a c code by using memory allocation for add ,multiply of sprase matrixes
What is the use of typedef in structure in c?
Differentiate between null and void pointers.
What is the use of sizeof?