Who is the caller?
        The caller is not a human, is not a user.
        If main() calls Max(), then main() is the caller.
        If fun1() calls func2(), then fun1() is the caller.

What is a return data type?
       By the end of function,  if you have a "return" statement,
       which kind of data type you return to the caller has to be
       listed in the beginning of function header.

When a function does not return any value
           to the calling program (Caller)
           or return more than one value,
           you must use the keyword void as the return class.

Examples:
 
Return more than one information
The information is passed back by parameters.
Return nothing. 
main() calls print() doing the job.
print() prints information on the screen and 
print() does not return any information to caller, main().
 #include <iostream.h> 
 void getData(int &x, int &y); 

 void main () 
 { 
  int num1=100, num2=200; 
     getData(num1, num2); 
  cout<<"num1= "<<num1<<", num2= "<<num2<<endl; 
 } 

 void getData(int &x, int &y) 
 { 
  cout<<"Enter two integers."<<endl; 
  cin>>x>>y; 
 }

 #include <iostream.h> 
 void print(int x, int y); 

 void main () 
 { 
  int num1=100, num2=200; 
  print(num1, num2);
 } 

 void print(int x, int y) 
 { 
  cout<<"The two numbers are "
      <<x<<"and "<<y<<endl; 
 }


 
Return the maximum number which is an integer. Return the average of two integers which may be a decimal.
 #include <iostream.h> 
 int getMax(int x, int y); 

 void main () 
 { 
  int num1=100, num2=200; 
  cout<<getMax(num1, num2)<<endl;
 } 

 int getMax(int x, int y) 
 { 
  if(x > y)
     return x;
   else
     return y;
 }

 #include <iostream.h> 
 float getAverage(int x, int y); 

 void main () 
 { 
  int num1=5, num2=2; 
  cout<<getAverage(num1, num2)<<endl;
 } 

 float getAverage(int x, int y) 
 { 
   int T;
   float avg;

   T = x + y;
   avg = float(T) / 2 ;
   return avg;
 }


 
Call more than one function.  Please see the interface between functions.
 #include <iostream.h> 
 void getData(int &x, int &y); 
 int getMax(int x, int y); 
 float getAverage(int x, int y);
 void print(int x, int y, int LargeOne, float avg); 

 void main () 
 { 
  int num1, num2, max; 
  float average;
  getData(num1, num2); 
  max = getMax(num1, num2);
  average = getAverage(num1, num2);
  print(num1, num2, max, average);
 } 

 void getData(int &x, int &y) 
 { 
  cout<<"Enter two integers."<<endl; 
  cin>>x>>y; 
 }
 int getMax(int x, int y) 
 { 
  if(x > y)
     return x;
   else
     return y;
 }
 float getAverage(int x, int y) 
 { 
   int T;
   float avg;

   T = x + y;
   avg = float(T) / 2 ;
   return avg;
 }
 
 void print(int x, int y, int LargeOne, float avg)
 {
    cout<<"You entered "
        << x << " and " << y << endl;
    cout<<"The maximum of "
        << x << " and "<< y 
        <<" is "<< LargeOne << endl;
    cout<<"The average of "
        << x << " and "<< y 
        <<" is "<< avg << endl;
 }