Tuesday 31 December 2013

Global Variable Example Using C++

#include<iostream.h>
int count;                               /* count is global*/
void function1();
void main()
{
 clrscr();

  count=100;

   function1();

   getch();

}
void function1()
{
   int temp;
   temp=count;
   cout<<"\n the value of temp and count ::" <<temp<<" " <<count;

}

No comments:

Post a Comment