C programming examples with output
Find Static Variables
Program
#include<stdio.h>
#include<conio.h>
main()
{
int c;
clrscr();
for(c=1;c<=3;c++)
stat();
getch();
}
stat()
{
static int sv=0;
sv=sv+1;
printf("%d",sv);
}
Output
1
2
3
Find Static Variables
Program
#include<stdio.h>
#include<conio.h>
main()
{
int c;
clrscr();
for(c=1;c<=3;c++)
stat();
getch();
}
stat()
{
static int sv=0;
sv=sv+1;
printf("%d",sv);
}
Output
1
2
3
0 komentar:
Post a Comment