Testing continue play a role in whether the switch-case

for(i=0,j=0; i<4; i++)

{
    switch(i)
    {
        case 0: j ++;
                      break;
        case 1: continue;
                       j++;
                       break;
        default: break;
    }
    printf("j=d%\n",j);
}
If you do not work continue, it should print four results, j final two.
j=1
j=2
j=2
j=2
If the continue function, the results should be printed three final value 1 and j.
j=1
j=1
j=1
 
Vs platform should verify, print the results for the latter to prove that continue switch-case in the cycle played a role.

Guess you like

Origin www.cnblogs.com/wuqi1003/p/12232969.html