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

What is an adjust field format flag?

656


what is scupper?

1899


Is there a sort function in c++?

558


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

624


Which one is a preferred language C or C++? Why?

627






What is dev c++ used for?

613


How are Structure passing and returning implemented by the compiler?

606


What is #include sstream?

637


Write a program in C++ for Fibonacci series

672


Which ide is best for c++?

553


How do you define a class in c++?

652


What is java and c++?

675


How do I exit turbo c++?

593


What is purpose of abstract class?

590


Can I learn c++ without learning c?

570