In C, the static keyword can be used in the global range, function range, or local range! First run the experiment code: [cpp] # include <stdio. h> void func (int I) {if (I & 0x01) = 1) {static int j = 1; // static variable j ++ defined in the local range; printf ("I = % d, j = % d. \ n ", I, j) ;}else {static int j = 0; // define another static variable j ++; printf (" \ ti = % d, j = % d. \ n ", I, j);} // printf (" j = ", j); // error. variable j is not defined return;} int main () {for (int I = 0; I <10; ++ I) func (I); return 0;} the code output is as follows: the execution result shows that the static variable j defined in if is independent from the static variable j defined in else, and the "Last value assignment result" is retained, stat defined in if and else Ic variables are visible only in the if or else local range, but not in the local range.