Bifalgorithm post · Computer science one · Void Functions
How are void functions defined in C?
How are void functions defined in C? (Computer science one · Void Functions) — "18.1.2. Void Functions\n\nThe keyword void can be used in C to indicate a funct…
Ideas in this flowchart
- Void functions in C
- A void function does not return a value.
- Including a return statement is good practice, although it is not necessary.
- A void function can have no input parameters.
- Example: defining the void function printCopyright.
- Prototype: void printCopyright();
- Definition: void printCopyright() { printf("(c) Bourke 2015"); return; }
- An explicit void parameter can indicate that the function takes no parameters: void printCopyright(void);