Functions provides modularity to the software.
#include <stdio.h>
int add (int x, int y) {
int z;
z = x + y;
return (z);
}
main ()
{
int i, j, k;
i = 10;
j = 20;
k = add(i, j);
printf ("The value of k is %d\n", k);
}
The value of k is 30
8.1.Function Introduction |
| 8.1.1. | Function |