C and C++ Programming Resources | C & C++ Code Example Index

 

 

The C++ Function: Built-in, C Function and User-defined Function Sample Codes Index Page

 

The following links demonstrate the C++ program examples on functions. The program examples include built-in and user-defined functions. In C++ class object, functions are the methods of the classes.

 

 

 

C++ Functions Code Samples

  1. A function and its return statement C++ program example

  2. A simple mathematical operation to demonstrate the C++ function that receive a float and return nothing

  3. Compiling C codes in C++, using C++ wrappers for C time and date manipulation program example

  4. The Fibonacci operation using recursive function C++ program example

  5. The Factorial operation using recursive function C++ code sample

  6. Declaring, defining and using user defined function in C++ programming

  7. Doing some arithmetic operations in demonstrating the C++ function that receive 2 floats and return a float

  8. Doing the mathematical arithmetic operation to demonstrate the user defined functions in C++ programming

  9. Creating the custom made C/C++ header file in C++ programming which is reusable

  10. How to use the user defined header file in C++ programming

  11. Doing the arithmetic operation by reusing the user defined header file in C++ programming

  12. Doing the arithmetic operations by reusing the user defined header file in C++ programming - creating our own library

  13. Using the inline function in C++ programming

 

  1. Calculating cube area in C++: using the function default parameter values

  2. The C++ function conditional return statements program example

  3. Swapping an integer value C++ program sample using function which pass argument by value

  4. Demonstrating the variables scope (local) within the function block in C++ program example

  5. Passing and processing functions' arguments demonstrating the local and global variable C++ program example

  6. Converting the Fahrenheit to Celcius degree C++ code sample demonstrating user defined function

  7. Calculating an area for the given width and length C++ code sample demonstrating user defined function

  8. Various user defined function 'templates' C and C++ program example

  9. Calculating an area of triangle using the inline function C++ program example

  10. The C++ user defined function code sample demonstrating passing and processing the function argument

  11. Using the isdigit(), isalpha(), isalnum() and isxdigit functions C++ program example

  12. Using the islower(), isupper(), tolower() and toupper() functions C++ code example

  13. Using the isspace(), iscntrl(), ispunct(), isgraph() and isprint() functions C++ code sample

 

C and C++ Programming Resources | C & C++ Code Example Index | C Code Example Index