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 / manish podiyal
C): outputs the address of v.
Is This Answer Correct ? | 1 Yes | 8 No |
Post New Answer View All Answers
Explain method of creating object in C++ ?
Is swift faster than c++?
How would you obtain segment and offset addresses from a far address of a memory location?
What is searching? Explain linear and binary search.
Explain the difference between c & c++?
Can I learn c++ without c?
What is the benefit of c++?
What is a static member?
the first character in the variable name must be an a) special symbol b) number c) alphabet
Is nan a c++?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
What is the difference between a declaration and a definition?
How do you master coding?
What is the use of setprecision in c++?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;