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 / ranjeet garodia
b is correct
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Explain the register storage classes in c++.
Is it possible for a member function to delete the pointer, named this?
Explain what are mutator methods in c++?
What is c++ w3school?
Define friend function.
List the issue that the auto_ptr object handles?
Explain Memory Allocation in C/C++ ?
What is the best c++ compiler?
What is code reusability in c++?
How does the copy constructor differ from the assignment operator (=)?
What are the characteristics of friend functions?
How many types of scopes are there in c++?
What is scope resolution operator in c++ with example?
What is the difference between structures and unions?
Who invented turbo c++?