In the function definition, we will implement the actual task of a function using a group of statements.
Write a function to add two numbers and return their sum.
What is the difference between function declaration and definition?
In the function declaration, we are giving information about the function to the compiler.
fuction sum will return a interger value.
And it will take two parameters both of them are type integer.
In the function definition, we are actually implementing the function.
In other words, we are defining the task using a group of statements.
Here, we are implementing addition task using a set of c statements.
We can also write the above function without using temporary variable ans like below,