Tuesday, 31 December 2013

C++ program to differentiate Local variable

#include<iostream.h>
void function()
{
  int j=10;
  cout<<j<<"\n" ;
  j++;
}
void main()
{
       clrscr();
     int i=10;
     for(i=0;i<10;i++)
     {
       function();
     }
}

No comments:

Post a Comment