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


Please Help Members By Posting Answers For Below Questions

What is the purpose of template?

607


What is scope in c++ with example?

628


How would you use the functions memcpy(), memset(), memmove()?

624


Define stacks. Provide an example where they are useful.

575


declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

1739






Which function cannot be overloaded c++?

575


What does h mean in maths?

570


what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?

1746


What is extern c++?

520


What is overloading unary operator?

598


How to get the current position of the file pointer?

554


What are register variables?

646


What is a breakpoint?

560


What is constructor in C++?

628


Is it possible to have a recursive inline function in c++?

552