Basically it has three core feature.
1. It retains the value between function calls.
2.By default function is extern..so it will be visible from other files if the function declaration is as static..it is invisible for the outer files
3. By default we can use the global variables from outside files If it is static global..that variable is limited to with in the file.
#include <stdio.h>
int variable = 10; main(){ int i = 0; } |
value of j 0 k 10 After 1st call
value of j 10 k 10 After IInd call
value of j 20 k 10 After IIUrd call
