Completely Solved C, C++ Programs Assignment.




C Program for example of static variable.

Filed Under:

Problem 98. C Program for example 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;
}

C compiler: gcc 4.1.2

 Back to main directory: Sample C Program | Software Practical | Solved C Assignment


Get Free Programming Tutorials and Solved assignments