If I use static variable inside the function, can it be of any use? I don't see any benefit. Even if I remove static keyword from the program, the output is the same
What happens when we use static with a function it's self?
What happens when we use static with a function it's self?
Code:
#include<stdio.h>
int main() {
static int x = 5;
x++;
printf("x : %d", x);
return 0;
}