Concept

How are void functions defined in C?

ComputerScienceOne / Void Functions

"18.1.2. Void Functions\n\nThe keyword void can be used in C to indicate a function does not return a value, in which case it is called a “void function.” Though it is not necessary, it is still good practice to include a return statement.\n\n//prototype:\n\nvoid printCopyright();\n\n//definition:\n\nvoid printCopyright() {\n\nprintf(\"(c) Bourke 2015\n\n\");\n\nreturn;\n\n}\n\nIn the example above, we’ve also illustrated how to define a function that has no inputs. Some sources may include an explicit void keyword as a parameter to indicate the function takes no parameters as in void printCopyright(void); ."

Related Ideas

How are void functions defined in C? | ComputerScienceOne | Bifalgorithm | Bifalgorithm