//This file is only to demonstrate C++ functions work //Purpose: To show that this function can be called in a driver program void hello() // Pre: Always works // Post: Changes nothing but outputs a message // Returns: Nothing useful { cout << "Hello, World\n"; return ; } // end hello //Purpose: To demonstrate call by value int mad( int x // IN: An integer value supplied by the main program. ) // Pre: x must be a valid int // Post: Does not change any part of calling program // Returns: Returns one more than the given value of x { x = x + 1; return x; } // end mad //Purpose: To demonstrate call by reference int sad( int & x // INOUT: An int VARIABLE supplied by the main program. ) // Pre: x must be a valid int variable // Post: The variable that x refers to is increased by 1 // Returns: Returns one more than the given value of x { x = x + 1; return x; } // end sad