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


Please Help Members By Posting Answers For Below Questions

What kind of problems can be solved by a namespace?

601


What sorting algorithm does c++ use?

609


When one must use recursion function? Mention what happens when recursion functions are declared inline?

661


Can a built-in function be recursive?

592


What is c++ in english?

587






Explain deep copy and a shallow copy?

620


Difference between pass by value and pass by reference?

619


What do you mean by friend class & friend function in c++?

627


Differentiate between a constructor and a destructor in c++.

577


Incase of a function declaration, what is extern means?

528


Define a pdb file.

646


Will this c++ program execute or not?

617


Define the operators that can be used with a pointer.

585


What is prototype for that c string function?

701


What are the steps in the development cycle?

625