expand icon
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

Edition 8ISBN: 978-1285867410
book C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith cover

C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith

Edition 8ISBN: 978-1285867410
Exercise 2
Pass by Reference and Pass by Address
In this exercise, you use what you have learned about passing arguments by reference and by address to functions to answer Questions.
Given the following variable and function declarations, write the function call and the function's header:
a.
double price = 22.95, increase =.10;void changePrice(double , double);
b.
double price = 22.95, increase =.10;void changePrice(double* , double);
c.
int age = 23;void changeAge(int );
d.
int age = 23;void changeAge(int*);
Explanation
Verified
like image
like image

a. Function header and function call for...

close menu
C++ Programs to Accompany Programming Logic and Design 8th Edition by Jo Ann Smith
cross icon