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 / ranjeet garodia
b is correct
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Explain mutable storage class specifier.
What is the basic structure of c++ program?
Can you pass a vector to a function?
What are the differences between new and malloc?
What are the c++ access specifiers?
What is the purpose of template?
Write about c++ storage classes?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)
Which c++ operator cannot overload?
What is virtual methods?
Do you know the problem with overriding functions?
What are c++ manipulators?
What's the most powerful programming language?