Static variables can be defined inside or outside the function. Static variables are initialized only once. They are local to the block.
The default value of static variables is zero. The static variables are alive till the execution of the program.
Static variables are declared with static keyword. Static variables have an essential property of preserving its value across various function calls.
By default, variables are local to the scope in which they are defined. Variables can be declared as static to increase their scope up to file containing them.
1 2
a = 15, sa = 15 a = 15, sa = 20 a = 15, sa = 25 a = 15, sa = 30 a = 15, sa = 35 a = 15, sa = 40 a = 15, sa = 45 a = 15, sa = 50 a = 15, sa = 55 a = 15, sa = 60