why static variable intialised in each calling of function but we have to declare it everytime in C : I read that : static variable is initialised only once (unlike auto variable) and further defination of static variable would be bypassed during runtime.  [from the link][1].

then why I am getting error that "i was not declare " in the code given below.
I wrote program such that the static variable "i" intiallised only first time when c is equal to 0 after that c increases.
#include<stdio.h>
int c=0;

    int test()
    {
    	if(c==0)
    	static int i=0;
    	c++;
    	i++;
        if(i==5)
        printf("%d\n",i);
        else
        test();
    }
    int main()
    {
    	test();
    	return 0;
    }

  [1]: http://stackoverflow.com/questions/5033627/static-variable-inside-of-a-function-in-c

