Parameters
void t1(); void t2(); int main() { . . . } int globalvar; void t1(int localToFunction1) { . . . } void t2() { int localToFunction2; . . . }
void t1(); int main() { t1(); t1(); return 0; } void t1() { static int x = 1; int y = 1; x++; y++; cout << "x is " << x << endl; cout << "y is " << y << endl; }
void printArea(double radius = 1) { double area; area = radius * radius * 3.14159; cout << "area is" << area << endl; } int main() { printArea(); // default value of 1 used printArea(4); return 0; }