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
Difference between declaration and definition of a variable.
Is it possible to get the source code back from binary file?
What is iterator c++?
Describe delete operator?
What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack
What is virtual base class uses?
What is a c++ vector?
What is array give example?
What is iomanip c++?
Can you pass a vector to a function?
what are the iterator and generic algorithms.
Specify some guidelines that should be followed while overloading operators?
Why c++ is the best language?
What do you mean by function overriding & function overloading in c++?
What is #include ctype h in c++?