C Program: Uses of Static Variable
#include<conio.h>
#include<stdio.h>
static int i=1;
main( )
{
int j;
clrscr( );
for (j=1;j<=5;j++);
fun( );
getch( );
}
fun( )
{
printf(“\n%d”,i);
i=i+1;
}
The Way to Programming
C Program: Uses of Static Variable
#include<conio.h>
#include<stdio.h>
static int i=1;
main( )
{
int j;
clrscr( );
for (j=1;j<=5;j++);
fun( );
getch( );
}
fun( )
{
printf(“\n%d”,i);
i=i+1;
}