Skip to content

Commit

Permalink
added static
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaanilkumar committed Jun 29, 2020
1 parent b39bf20 commit 597b631
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions C/static_type.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//static example

#include<stdio.h>

void stat(void);

void main ( )
{
int i;
for(i=1; i<=3; i++)
stat( );
}
void stat(void)
{
static int x = 0;
x = x+1;
printf("x = %d\n", x);
}

0 comments on commit 597b631

Please sign in to comment.