Returning Values from Functions - C++ Function

C++ examples for Function:Function Return

Description

Returning Values from Functions

Demo Code

#include <iostream> 
  
using namespace std; 
  
int ReturnSum(int valueA, int valueB) 
{ 
        return valueA + valueB; 
} 
  
int main(int argc, char *argv [])
{ 
        int sum = ReturnSum(3, 6); 
        cout << sum << endl; 
  
        return 0; 
}

Result


Related Tutorials