Returning values in functions in C: Types of functions based on return value

Every function returns a value except the one with void. Here are the types of functions based on their return value:

1) Pure or computational functions: These are computational functions that return a value after execution. Example: Standard library functions: sqrt()

2) Success or failure type: These functions return a true or a false value. For Example: fclose()

3) Functions having no return value: These are the procedural functions and they return no value. Example: void ()

Leave a Reply