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

Why is c++ difficult?

616


Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

625


Why is c++ a mid-level programming language?

597


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

705


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

585






Explain the isa and hasa class relationships.

595


What is abstraction in c++ with example?

565


Can a Structure contain a Pointer to itself?

612


What does iomanip mean in c++?

611


What is a multimap c++?

684


Do you know about C++ 11 standard?

638


What is a static member?

619


What are the basics of local (auto) objects?

635


Can I run c program in turbo c++?

586


What is the use of :: operator in c++?

605