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 / guest
Ten(10) is the out put
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?
Explain terminate() function?
What is prototype in c++ with example?
Explain the uses oof nested class?
Explain the difference between overloading and overriding?
How do I use arrays in c++?
Is java made in c++?
What is the standard template library (stl)?
How long it will take to learn c++?
How do you print a string on the printer?
What are built-in functions? What is the syntax for the definition?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
What you know about structures in C++?
Why namespace is used in c++?
What is enum class in c++?