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
How can you differentiate between inheritance and implementation in c++?
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
What is encapsulation in c++ with example?
What is a constant? Explain with an example.
What are the various access specifiers in c++?
What is the meaning of c++?
How can we check whether the contents of two structure variables are same or not?
What is the basic difference between C and C++?
Explain linked list using c++ with an example?
What do you mean by late binding?
Implement stack operations with pointers with appropriate exception checks.
What is ofstream c++?
How can you link a c program with a c function?
When should we use multiple inheritance?
Which is the best c++ compiler?