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 is c++ difficult?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
Why is c++ a mid-level programming language?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0
Explain the isa and hasa class relationships.
What is abstraction in c++ with example?
Can a Structure contain a Pointer to itself?
What does iomanip mean in c++?
What is a multimap c++?
Do you know about C++ 11 standard?
What is a static member?
What are the basics of local (auto) objects?
Can I run c program in turbo c++?
What is the use of :: operator in c++?