Here is the code,
Why does the output result include "one"? Thanks.Code:int main() { int i=4; switch(i) { default:printf("zero\n"); case 1: printf("one\n"); break; case 2:printf("two\n"); break; case 3: printf("three\n"); break; } return 0; }
CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
Results 1 to 9 of 9
Thread: A question regarding switch/caseThreaded View
|
Click Here to Expand Forum to Full Width |