Lecture 157
//Procedures and Functions
//Code:
#include <iostream>
#include <conio.h>
using namespace std;
int i=0;
void Val(); //
Prototype
main ()
{
cout
<<"\n Main 's i : "<<i;
i++;
Val();
cout
<<"\n Main 's i : "<<i;
Val();
getch();
return 0;
}
void Val()
{
i=100;
cout
<<"\n Val's i : "<<i;
i++;
}
Output: