C Program: Uses of Static Variable

CWC
0 Min Read

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;
}

 

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version