Hi,

I was exploring static variable by writing code snippets. I tried below code and it ended up throwing error saying "error: storage class specified for parameter 'b'"

Why static cannot be used in func() ?
Code:
int main()
{
int a; a=5; func(a); printf("%d",a); return 0;
} void func(static int b) {
b=6; printf("%d",b);
}
Thanks,
Shilpa