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
What are the advantage of using register variables?
Where are setjmp and longjmp used in c++?
What is the iunknown interface?
Can you overload the operator+ for short integers?
Which operations are permitted on pointers?
Why struct is used in c++?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?
Difference between class and structure.
How does the copy constructor differ from the assignment operator (=)?
How many types of comments are there in c++?
What is a multiset c++?
What is the insertion operator and what does it do?
What is the difference between global variables and static varables?
What is the role of static keyword for a class member variable?
Why is main function important?