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 class definition in c++ ?
What are the 2 main types of data structures?
Which programming language is best?
What are namespaces in c++?
What is the difference between *p++ and (*p)++ ?
Define the process of error-handling in case of constructor failure?
What is a multiset c++?
What is a literal in c++?
What do you mean by ‘void’ return type?
How to get the current position of the file pointer?
List the issue that the auto_ptr object handles?
Which programming language is best to learn first?
describe private access specifiers?
What are vtable and vptr?
What are the advantages of using const reference arguments in a function?