#include /* Illustrates the features of the storage class static gcc -ansi s*.c -o s => s */ static int a = 4; /* global variable but local to this file */ void f1(void) { static int b = 6; ++a; ++b; printf("From f1: a = %d b = %d\n", a, b); } main() { extern int b; f1(); f1(); printf("From main-1: a = %d b = %d\n", a, b); f2(); f2(); ++b; printf("From main-2: a = %d b = %d\n", a, b); }