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 / ranjeet garodia
b is correct
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is the difference between method overloading and method overriding in c++?
Why ctype h is used in c++?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
What are put and get pointers?
What are keywords in c++?
What is basic if statement syntax?
What is data hiding c++?
Is java made in c++?
What are the various situations where a copy constructor is invoked?
What is the difference between #import and #include?
What is dev c++ used for?
what are the iterator and generic algorithms.
What is atoi in c++?
What is the use of :: operator in c++?
What is the difference between set and map in c++?