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
Explain what is meant by high-order and low-order bytes?
Explain what happens if you free a pointer twice?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
Explain what is a pragma?
What is floating point constants?
What is the process of writing the null pointer?
What are header files why are they important?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Write a program to swap two numbers without using third variable in c?
What is substring in c?
Explain what does a function declared as pascal do differently?
Can include files be nested? How many levels deep can include files be nested?
How can I write a function that takes a format string and a variable number of arguments?
Can you please compare array with pointer?