Chapter
Void Functions
From ComputerScienceOne by Dr Chris Bourke
Concepts
- How do C functions return values to the calling function?
"18.1. Defining & Using Functions\n\ndouble getDistance(double x1, double y1, double x2, double y2) {\n\ndouble xDiff = (x1-x2);\n\ndouble yDiff = (y1-y2);\n\nreturn sqrt( xDiff * xDiff + yDiff * yDif
- How are void functions defined in C?
"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