Function
Function
Functions are used to perform certain actions, and they are important for
reusing code: Define the code once, and use it many times.
Library Functions User-Defined Functions
function_name (argument_list)
● Function Definition It is defining the actual statements that the compiler
will execute upon calling the function. You can think of it as the body of the
function.
return_type function_name (argument list) {function
body;}
Different aspects of function calling
● By using functions, we can avoid rewriting same logic/code again and again in a
program.
● We can call C functions any number of times in a program and from any place in
a program.
● We can track a large C program easily when it is divided into multiple functions.
● Enables reusability and reduces redundancy
● Makes a code modular
● Provides abstraction functionality
● The program becomes easy to understand and manage
● Breaks an extensive program into smaller and simpler pieces