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
What is the purpose of template?
What is scope in c++ with example?
How would you use the functions memcpy(), memset(), memmove()?
Define stacks. Provide an example where they are useful.
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Which function cannot be overloaded c++?
What does h mean in maths?
what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?
What is extern c++?
What is overloading unary operator?
How to get the current position of the file pointer?
What are register variables?
What is a breakpoint?
What is constructor in C++?
Is it possible to have a recursive inline function in c++?