3. Function-Definition
A function is a group of statements that together
perform a task. Every C program has at least
one function, which ismain(), and all the most
trivial programs can define additional functions.
A functiondeclarationtells the compiler about a
function's name, return type, and parameters.
4. Need
The C standard library provides numerous built-in
functions that your program can call. For
example,strcat()to concatenate two
strings,memcpy()to copy one memory location
to another location, and many more functions.
No Need to copy code just call by its function
name
6. Function Arguments
In programming, argument refers to the
variable passed to the function.
Parametersaandbaccepts the passed
arguments in the function definition. These
arguments are called formal parameters of the
function.
9. Return Value
The return statement terminates the execution of a
function and returns a value to the calling function.
10. Example
Program to add two numbers with arguments and return value
#include<stdio.h>
#include<conio.h> //headers
Int sq(int num) //return type function name and argument
{
int ans;
ans=num*num; //statement
return(ans); //returning value of ans
}
void main()
printf(Enter the number);
scanf(%d,&num);
result=sq(num); //value of above program
printf(%d,result);
}