#include<stdio.h>
void func();
int main()
{
func();
func();
return 0;
}
void func()
{
auto int i = 0;
register int j = 0;
static int k = 0;
i++; j++; k++;
printf("\n %d % d %d", i, j, k);
}
Output:
1 1 1
1 1 2
While in some compilers (like Visual Studio), using auto as type-specifier may result in an error.