C Programming Function Facts

Interesting Facts About Functions in C

  1. All C programs must contain a main() function.

  2. The operating system calls main function of a program from where program's execution starts.

  3. One function can call another function.

  4. C functions can be called with or without arguments depending on function declaration.

  5. We can create any number of functions in a C program.

  6. C Functions can be invoked from anywhere within a C program.

  7. We can call a function any number of times in a C program.

  8. Function name should be unique in a C program.

  9. A function declaration in C tells the compiler about function name, function parameters and return value of a function.

  10. C function can return only one value to the calling function.

  11. C functions may or may not return values to calling functions depending on the return type defined in function declaration. Void data type is used when the function does not return any value. By default the return type of a function is integer(int).

  12. There are two types of functions in C, library functions and User defined functions.

  13. When a function terminates, program control is returned to the calling function from where it is called.

  14. Execution of a C program comes to an end when there is no functions or statements left to execute in main function body.