CSCI 240 - Function Worksheet 1

Basics

Answer questions about the 3 function prototypes below.

long int Factorial(int );

double FindAverage(double , int );

void PrintTitle(string , int , int );

1. What type of value will each function return?

2. How many arguments does each function expect?

3. Write a calling statement for each function using constant values as arguments. (Use values like 1, 2, 3.5, "Mary", not num1, name etc.)

4. Write a calling statement for each function using variables as arguments.

NOTE: When you call a function you do not need to know the variable names that the function uses for the arguments.