Code:
#include <stdio.h>
int main()
{
int a=10;
static int b=2;
a = a+1;
b = b-1;
printf("%d \n",a);
printf("%d \n",b);
printf("%d \n","%d",a,b);
return 0;
}
Output:
11
1
4210693
My Question: b is a static variable, so how come its value changed in the second printf() function used? The third printf() function makes sense because it has given an error.