Function Parameters and Return Values in c++
This video tutorial explains what are function parameters and return values in c++.
You will learn how to pass values to a function, how to return values from a function in detail with examples.
source code for this tutorial
#include <iostream> using namespace std; int display(int,int); int main() { int result; result = display(20,30); cout << "result is " << result; return 0; } int display(int a, int b){ cout << a <<endl; cout << b <<endl; return a+b; }