C examples for Function:Function Parameter
Test of passing arguments by value by changing its value inside function
#include <stdio.h> void demoPassByValue(int); int main()/*from w ww. j a va2 s . c o m*/ { int x = 0; printf("\nEnter a number: "); scanf("%d", &x); demoPassByValue(x); printf("\nThe original value of x did not change: %d\n", x); } void demoPassByValue(int x) { x += 5; printf("\nThe value of x is: %d\n", x); }