Prototype
A function prototype is a declaration specifying a function’s name, return type, and parameter types without its implementation.
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.
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.
Related concepts
- header filepart of · A header file is a source file containing declarations, definitions, macros, or other interface information intended for inclusion in one or more source files during compilation.
- callconfigures · A function call is an operation or expression that invokes a function or other callable, optionally supplies arguments, and initiates its execution.
- return typehas part · A return type is the declared or inferred type of the value that a function or method supplies to its caller.
- void typeconfigured by · A void type is a type or return designation indicating that an operation produces no meaningful value for its caller.
- declarationkind of · A declaration is source syntax that introduces a program entity and specifies its name, type, or other properties without necessarily defining it or assigning a value.
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.

