Review Questions

1:What are the three steps in using a function?
2:Construct function prototypes that match the following descriptions:
  1. igor() takes no arguments and has no return value.

  2. tofu() takes an int argument and returns a float.

  3. mpg() takes two type double arguments and returns a double.

  4. summation() takes the name of a long array and an array size as values and returns a long value.

  5. doctor() takes a string argument (the string is not to be modified) and returns a double value.

  6. ofcourse() takes a boss structure as an argument and returns nothing.

  7. plot() takes a pointer to a map structure as an argument and returns a string.

3:Write a function that takes three arguments: the name of an int array, the array size, and an int value. Have the ...

Get The Waite Group's C++ Primer Plus, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.