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

Explain storage qualifiers in c++.

707


What is the use of "new" operator?

759


What does #define mean in c++?

761


What is recursion?

742


What is the use of dot in c++?

712






What is meant by iomanip in c++?

713


Which is best c++ or java?

739


Which software is best for c++ programming?

657


What do you mean by static variables?

687


What is istream and ostream in c++?

697


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

1840


What is different in C++, compare with unix?

699


Please explain class & object in c++?

674


How do you establish an is-a relationship?

705


What is the size of a vector?

674