1. What does the following do:
void afunction(int *x)
{
x=new int;
*x=12;
}
int main()
{
int v=10;
afunction(&v);
cout<<v;
}
a) Outputs 12
b) Outputs 10
c) Outputs the address of v
Answer Posted / guest
Ten(10) is the out put
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
When to use “const” reference arguments in a function?
Tell me can a pure virtual function have an implementation?
How would you call C functions from C++ and vice versa?
What is decltype c++?
Why iomanip is used in c++?
What are the benefits of oop in c++?
What is endl c++?
What is the purpose of extern storage specifier?
What problems might the following macro bring to the application?
What is &x in c++?
How do we balance an AVL Tree in C++?
Can a constructor be private?
Can we make copy constructor private in c++?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
how to explain our contribution in the project?