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 are literals in C++?
Comment on local and global scope of a variable.
What is the use of endl in c++?
What is iomanip c++?
What is the this pointer?
What is a v-table?
What is the best c++ book for beginners?
How do you add an element to a set in c++?
Explain the difference between class and struct in c++?
What is one dimensional array in c++?
What are the various compound assignment operators in c++?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL
Explain the isa and hasa class relationships.
Why do we learn c++?
What is malloc in c++?