Different Types of Functions in C

Notes:

Different Types of Functions in C Programming Language:
- There are mainly 2 types of functions in C
1. Built in functions
2. User defined functions

1. Built in functions: are also called library functions
- are functions which are already defined in the library of C language. Each built in function is meant to perform a specific task.

Ex:
printf, scanf, rand, malloc, calloc, realloc, free etc.
- printf function is meant to print some text on the screen
- scanf function is meant to read some value from the keyboard
- rand function is meant to generate some random number
- malloc & calloc functions are meant to allocate memory locations at runtime
- realloc function is meant to reallocate or resize an already allocated memory location
- free function is meant to deallocate or free an already allocated memory location

2. User defined functions:
- W.K.T if required we can also define our own functions; which are called user defined functions. User defined functions are functions which are defined by programmers.

Note: functions may or may not accept parameters and may or may not return a value

Based on the presence and absence of parameters and return value, functions are again categorized into 4 different types:
- A function without parameters and without return value
- A function with parameters and without return value
- A function without parameters and with return value
- A function with parameters and with return value