C switch statement with do-while interleaved [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How does Duff's device work? I am trying to understand how this is working. Any help would be appreciated. #include<stdio.h> void duff(int count) { int n=(count+7)/8; printf("n=%d count =%d\n",n,count%8); switch(count%8){ case 0: do{ printf("case 0\n"); case 7: printf("case 7\n"); case 6: printf("case 6\n"); case 5: printf("case 5\n"); case 4: printf("case 4\n"); case 3: printf("case 3\n"); case 2: printf("case