Learning & getting upto speed with the concepts of C Programming. I recently read about storage classes and I have a question in my mind.
Output : 14 11 8 5 2.How does this code works?Code:#include<stdio.h> int fun() { static int num = 16; return num--; } int main() { for(fun(); fun(); fun()) printf("%d \n", fun()); return 0; }
keeping --num in fun(), is running an infinite loop. What can be the reason?