Static storage class:
The location of the static storage class is memory. The default initial value is zero. The variable will be alive until the end. Their value persists along the function call. The variable scope is up to the block in which it is defined.
static int i =1;
When function is called it executes and prints 1. And i is incremented to 2. After the 1st call, second call will happen, in that incremented i value I printed. But of we execute same by keeping i as auto, it will print 11.
The static variables are initialized only once, re initialization will not be allowed in the static storage class.