int f() {
int I = 12;
int &r = I;
r += r / 4;
int *p = &r;
*p += r;
return I;
}
Referring to the sample code above, what is the return value
of the function "f()"?
a) 12
b) 15
c) 24
d) 17
e) 30
Answer Posted / guest
ans: 30 i.e 'e'
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Explain all the C++ concepts using examples.
What is the difference between cin.read() and cin.getline()?
Is it possible to have a recursive inline function in c++?
Difference between pass by value and pass by reference?
Why do we need templates?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
Do you know what is overriding?
What are formatting flags in ios class?
How do I write a c++ program?
How many different levels of pointers are there?
What is a stack? How it can be implemented?
What is the type of 'this' pointer? When does it get created?
Why is null pointer used?
What are single and multiple inheritances in c++?
What is srand c++?