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
Why do we use string in c++?
Is c++ fully object oriented?
What is the difference between while and do while loop? Explain with examples.
What does the ios::ate argument do?
Is c++ proprietary?
Is java easier than c++?
Is c++ still in demand?
What is object oriented programming (oop)?
How do I run a program in notepad ++?
Is arr and &arr are same expression for an array?
Describe the advantages of operator overloading?
What is encapsulation in C++? Give an example.
What is the default access level?
Is c the same as c++?
Which c++ compiler is best?