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
Explain linked list using c++ with an example?
If I is an integer variable, which is faster ++i or i++?
What is the syntax for a for loop?
Write a program which employs Recursion
What is the basic concept of c++?
What are the advantages of using typedef in a program?
What is the purpose of templates in c++?
What is an inline function in c++?
What is a container class?
Why #include is used?
What is the difference between structures and unions?
What does floor mean in c++?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
describe private access specifiers?
What is data abstraction? How is it different from data encapsulation?