< Previous | Contents | Next >

Exercises

1. Improve the Mad Lib game from Chapter 5 by using references to make the program more efficient.

2. Whats wrong with the following program?

int main()

{

int score; score = 1000;

float& rScore = score; return 0;

}


3. Whats wrong with the following function?

int& plusThree(int number)

{

int threeMore = number + 3; return threeMore;

}


This page intentionally left blank



chapter 7


image