Electrical and Computer Engineering
43 of 48
UAH
CPE 112
Function Calls
•The following C++ statement has a call to the function Square in it:
• cout << “27 squared is” << Square(27);
•The function call consists of the symbols
• Square(27)
• and may also be called a function invocation.
•The computer temporarily puts the main function on hold and starts the Square function running.
•When the Square function has finished doing its work, the computer goes back to main and picks up where it left off.