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
Difference between overloading vs. Overriding
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
What are pointers used for c++?
Is c++ vector a linked list?
What are static variables?
Why do we need pointers?
When should we use multiple inheritance?
Differentiate between C and C++.
What is a dangling pointer in c++?
What are member functions used in c++?
What is setbase c++?
What is c strings syntax?
What is null c++?
What is array give example?
Write a program to find the Factorial of a number