Chapter 9

1: What is the difference between an actual argument and a formal parameter?
A1: A formal parameter (also termed a formal argument) is a variable that is defined in the function being called. The actual argument is the value appearing in the function call; this value is assigned to the formal argument. You can think of the actual argument as being the value to which the formal parameter is initialized when the function is called.
2: Write ANSI C function headings for the following functions described. Note we are asking just for the headings, not the body.
  1. donut() takes an int argument and prints that number of 0s.

  2. gear() takes two int arguments and returns type int.

  3. stuff_it() takes a double and the address of a double variable and stores ...

Get C Primer Plus, Fourth 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.