liveBook · Manning

Prototype

A function prototype is a declaration specifying a function’s name, return type, and parameter types without its implementation.

How 2 Manning books explain it

Modern C, Third Edition

A function prototype is a declaration that specifies a function's name, return type, and parameter types without providing its body.

How it is used
Determines how functions can be called by making parameter and return types available to the caller.
How deep it goes
Explains declaration syntax, optional parameter names, void conventions, and call-site conversions; defers details of `extern`.
Examples
Uses `leapyear` declarations, a `fbar(2)/2` call, and portable `main` prototypes.
What you can do after
Apply it to declare callable functions and reason about argument conversion, return types, and portable `main` signatures.

Read how Modern C, Third Edition explains prototype →

Modern C

A function prototype is a declaration that specifies a function's parameter types and return type.

How it is used
Uses parameter and return types to govern function calls and guide compiler conversions.
How deep it goes
Explains declaration syntax, void conventions, conversions, and special main forms without descending into linkage details.
Examples
Uses leapyear declarations, fbar argument conversion, main prototypes, and the exit declaration.
What you can do after
Evaluate function interfaces and anticipate compiler checking and conversions at calls.

Read how Modern C explains prototype →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.