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 / guest
Ten(10) is the out put
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Which coding certification is best?
Why do we use string in c++?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
What is difference between class and function?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
How do you declare A pointer to a function which receives nothing and returns nothing
How long will it take to learn programming?
What jobs can you get with a c++ certification?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What is the benefit of learning c++?
What is abstraction in c++?
Specify different types of decision control statements?
What is cin clear () in c++?
What is the difference between function overloading and operator overloading?