Skip to Main Content
C++ Primer Plus, Fourth Edition
book

C++ Primer Plus, Fourth Edition

by Stephen Prata
November 2001
Beginner content levelBeginner
1128 pages
29h 12m
English
Sams
Content preview from C++ Primer Plus, Fourth Edition

Chapter 7

1:What are the three steps in using a function?
A1: The three steps are defining the function, providing a prototype, and calling the 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.

A2:
  1. void igor(void); // or void ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ Primer Plus, Fifth Edition

C++ Primer Plus, Fifth Edition

Stephen Prata
C++ All-In-One For Dummies®, 2nd Edition

C++ All-In-One For Dummies®, 2nd Edition

John Paul Mueller, Jeff Cogswell
C++ Primer Plus

C++ Primer Plus

Stephen Prata

Publisher Resources

ISBN: 0672322234Purchase book