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 call by reference in functions?
Why is c fast?
What is c token?
Explain union. What are its advantages?
What is extern storage class in c?
How does sizeof know array size?
What is the newline escape sequence?
What are pointers? Why are they used?
Are local variables initialized to zero by default in c?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
How do you view the path?
Why isnt any of this standardized in c?
Is there a way to compare two structure variables?
What is the difference between text and binary modes?