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 / manish podiyal
C): outputs the address of v.
| Is This Answer Correct ? | 1 Yes | 8 No |
Post New Answer View All Answers
What is the difference between global variables and local variable
Is turbo c++ free?
Explain the volatile and mutable keywords.
What is vectorial capacity?
Explain dangling pointer.
Differentiate between a constructor and a destructor in c++.
How to declare an array of pointers to integer?
Which of the following is evaluated first: a) && b) || c) !
How long it will take to learn c++?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What is buffer and example?
What are manipulators used for?
How are the features of c++ different from c?
List the issue that the auto_ptr object handles?
What is guard code in c++?