C examples for Function:Function Return
A variable may also be returned in by value or by address.
By default a function returns by value.
A copy of the value is returned to the caller.
#include <stdio.h> int byVal(int i) { return i + 1; } int main(void) { int a = 10;//from w w w.ja v a2 s .com printf("%d", byVal(a)); /* "11" */ }