int main()
{
int *p=new int;
*p=10;
del p;
cout<<*p;
*p= 60;
cout<<*p;
}
what will be the output & why?
Answer Posted / hemang
There will be error because del is used instead of delete. in c++ delete is the keyword not del. delete is used to delete an object.
So program will not run....
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
What are the two forms of #include directive?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
What is variable and explain rules to declare variable in c?
Is there any data type in c with variable size?
Can true be a variable name in c?
What is the best way to store flag values in a program?
What are integer variable, floating-point variable and character variable?
What are 3 types of structures?
What are examples of structures?
What is keyword with example?
What is the use of function in c?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
What extern c means?
What is union in c?