Abdelrahman Mohamed 20150066
1) Indicate which of the following is the function prototype, the function header, and the
function call:
1-void showNum(double num) is a function Header
2-void showNum(double); is a function prototype
3-showNum(45.67); is a function call
2) What is the difference between local variable and global variable?
Global variables are declared outside any function, and they can be accessed (used) on any function in
the program. Local variables are declared inside a function, and can be used only inside that function.
3) What is the output of the following program?
test();—-> 5 10 15
test(6);—> 9 10 15
test(3,9);—> 6 15 15
test(1,5,7);—> 4 11 16
4) Write a program that uses a function called max to determine the maximum of three
arguments.
#include <iostream>
#include <conio>
int maximum (int,int,int);
main()
{
int a,b,c;
cout<<“Enter Three Integers: “;
cin>>a>>b>>c;
cout<<“Maximum is: “<<maximum(a,b,c)<<endl;