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


Please Help Members By Posting Answers For Below Questions

Explain how to initialize a const member data.

604


What do you mean by const correctness?

643


Is there a sort function in c++?

558


List the types of polymorphism in c++?

637


Explain the static storage classes in c++.

715






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

2209


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?

653


Can comments be longer than one line?

633


What are the various oops concepts in c++?

610


What is the full form nasa?

603


What is c++ virtual inheritance?

608


Why do we need c++?

605


Name the implicit member functions of a class.

606


What is lvalue?

710


What do you mean by a template?

636