Networking, Programming and Graphics Tutorials

Functions in C++ [2/2]

Funcions > Call by value

There are two ways in which a function can pass parameters. They are call by reference and call by value. In call by value method, the called function creates a new set of variables and copies the values of arguments in to them. The called function does not have access to the actual variables in the calling program and can only work on the copies of values. The change made to the formal parameters do not affect the actual parameter values. The example is an illustration of call by value method passing parameters.
Means to Learn

Functions in C++
Funcions > Call by reference

When arguments are passed by reference the formal arguments in the called function becomes aliases to the actual arguments in the calling function. When the function is working with its own arguments, it is actually working on the original data. The example is an illustration for call by reference method passing parameters.
Means to Learn

Functions in C++
Rate this tutorial:                    
Networking, Programming and Graphics Tutorials - Functions in C++ [2/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: functions & types of functions in c++  php how to use functions  how to use functions in php  how many functions in php  PHP where to use functions  c++ functions  php functions for c++  " FUNCTIONS IN C++"  "Functions in c++"  c++ functions  .NET functions of C++  functions in С++  functions in C++  PHP functions to C  functions on C++  functions for c++  c pic functions  functions in c  functions in functions in c++  c++ functions in c++