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 / arun pateel
Answer is b
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can you pass a vector to a function?
How many static variables are created if you put one static member into a template class definition?
Explain operator overloading.
Is dev c++ a good compiler?
Specify some guidelines that should be followed while overloading operators?
What it is and how it might be called (2 methods).
What is a class definition?
What are the extraction and insertion operators in c++? Explain with examples.
What is abstraction with real time example?
write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;
Which is best c++ or java?
Write about the scope resolution operator?
What is anonymous object in c++?
Explain the advantages of using friend classes.
Explain the differences between private, public and protected and give examples.