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 a pdb file?
What are the uses of static class data?
What is the type of this pointer in c++?
Why do we use string in c++?
How can a struct in c++ differs from a struct in c?
What is c++ namespace?
What is a dangling pointer in c++?
Can I learn c++ without knowing c?
What is the difference between multiple and multilevel inheritance in c++?
What c++ is used for?
What are the methods of exporting a function from a dll?
What is atoi?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
What is the difference between the functions memmove() and memcpy()?