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 / arun pateel
Answer is b
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain storage qualifiers in c++.
What is the use of "new" operator?
What does #define mean in c++?
What is recursion?
What is the use of dot in c++?
What is meant by iomanip in c++?
Which is best c++ or java?
Which software is best for c++ programming?
What do you mean by static variables?
What is istream and ostream in c++?
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
What is different in C++, compare with unix?
Please explain class & object in c++?
How do you establish an is-a relationship?
What is the size of a vector?