Functions with input arguments receive data from the calling function through
parameters. These parameters allow the function to operate on different values
each time it is called, thereby increasing flexibility and reusability.

The arguments specified in the function call are called actual parameters,
while the parameters listed in the function definition are known as formal
parameters. When the function is invoked, the values of the actual parameters
are copied into the formal parameters.
SYNTAX:

return_type function_name(type arg1, type arg2) {
   statements;
}
#include <stdio.h>

void addtins(int tins){
    tins=tins+50;
    printf("First Run : %d\n",tins);
}

int main() {
    int total_tins=100;
    printf("%d\n",total_tins);
    addtins(total_tins);
    printf("%d",total_tins);

    return 0;
}
Previous Next