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
Show the declaration for a static member variable.
What is the function of I/O library in C++ ?
What is anonymous object in c++?
What is a forward referencing and when should it be used?
Difference between a homogeneous and a heterogeneous container
How did c++ start?
How do you save a c++ program?
Give 10 points of differences between C & C++.
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
What are the three forms of cin.get() and what are their differences?
What are multiple inheritances (virtual inheritance)?
what do you mean by volatile variable?
What is c++ iterator?
Explain the difference between c++ and java.
Write a code/algo to find the frequency of each element in an array?