Home > Programming > Functions using the "C" programming language

 

Here is a collection of simple programms in "C" programming language that demonstrate the usage of functions, parameters, return values, etc.

example01.c Demonstrate functions using integer array parameters.
example02.c Demonstrate functions using integer array parameters.
example03.c Demonstrate functions using float array parameters.
example04.c Demonstrate functions using two dimention array parameters.
example05.c Demonstrate functions using three array parameters.
example06.c Demonstrate functions using variable size array parameters.
example07.c Demonstrate how to pass stuctures as function parameters.
example08.c Demonstrate how to pass stuctures as function parameters.
example09.c Demonstrate how to pass unions as function parameters.
example10.c Demonstrate how to pass stuctures as function parameters.
example11.c Demonstrate how to pass a pointer to integer as function paramete.
example12.c Demonstrate how to pass a pointer to long as function parameter.
example13.c Demonstrate how to pass a pointer to structure as function parameter.
example14.c Demonstrate a function that returns a pointer to an integer value.
example15.c Demonstrate a function that returns a pointer to a global variable of type union.
example16.c Demonstrate a function that returns a pointer to an array.
example17.c Demonstrate how to use strings as function parameters.
example18.c Demonstrate how to use strings as function parameters.
example19.c Demonstrate how to use strings as function parameters.
example20.c Demonstrate how to use strings as function parameters.
example21.c Demonstrate a function that returns a string.
example22.c Demonstrate how to use file pointers as function parameters.
example23.c Demonstrate how to use file pointers as function parameters.
example24.c Demonstrate the main() function.
example25.c Demonstrate the main() function when it returns a value.
example26.c Demonstrate the main() function when it has parameters.
example27.c Demonstrate a recursive function call.
example28.c Demonstrate a recursive function call.
example29.c Demonstrate a recursive function call.
example30.c Demonstrate a recursive function call.
example31.c Demonstrate a recursive function call.
example32.cpp Demonstrate the usage of inline functions.
example33.c Demonstrate how to use a function pointer as a function parameter .
example34.c Demonstrate a function with variable number of parameters.
example35.cpp Demonstrate how to use function templates.

In order to download all the examples above click here (18Kb).

1