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
What kind of problems can be solved by a namespace?
What sorting algorithm does c++ use?
When one must use recursion function? Mention what happens when recursion functions are declared inline?
Can a built-in function be recursive?
What is c++ in english?
Explain deep copy and a shallow copy?
Difference between pass by value and pass by reference?
What do you mean by friend class & friend function in c++?
Differentiate between a constructor and a destructor in c++.
Incase of a function declaration, what is extern means?
Define a pdb file.
Will this c++ program execute or not?
Define the operators that can be used with a pointer.
What is prototype for that c string function?
What are the steps in the development cycle?