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


Please Help Members By Posting Answers For Below Questions

What are the advantage of using register variables?

743


Where are setjmp and longjmp used in c++?

723


What is the iunknown interface?

772


Can you overload the operator+ for short integers?

688


Which operations are permitted on pointers?

658






Why struct is used in c++?

704


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

757


Difference between class and structure.

793


How does the copy constructor differ from the assignment operator (=)?

715


How many types of comments are there in c++?

655


What is a multiset c++?

668


What is the insertion operator and what does it do?

654


What is the difference between global variables and static varables?

673


What is the role of static keyword for a class member variable?

725


Why is main function important?

686