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
Explain how to initialize a const member data.
What do you mean by const correctness?
Is there a sort function in c++?
List the types of polymorphism in c++?
Explain the static storage classes in c++.
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
Can comments be longer than one line?
What are the various oops concepts in c++?
What is the full form nasa?
What is c++ virtual inheritance?
Why do we need c++?
Name the implicit member functions of a class.
What is lvalue?
What do you mean by a template?