# CS210 Lab: Templates Prelab

## Overview

In summary, you can define functions with the same name but with different parameter types or different number of parameters. When you do this, you can say that you have overloaded a function.

For instance, given the following prototypes,
```void timesTwo(int &num);
void timesTwo(double &num);
```
you can see that the function timesTwo is overloaded (because the first prototype has an int parameter and the second has a double parameter).

## Prelab Exercise:

1. Given a function prototype:
```void stradd(char *s1, char *s2);
```

1. void stradd(char *s1, int i);
2. void sstradd(int i, int j);
3. void stradd(char *s1, char *s2, int i);
4. void stradd(int i, int j);
5. void stradd3(char *s1, char *s2, char *s3);

2. Given the following function, which calculates the average of an array of numbers of type int:
```int average(int array[], int size);
{
int total=0;   			//set total to 0
for (int j=0; j<size; j++) 	//for every array member,
total+=array[j];	//add it to total