What will be the output of the following function?
main() { int i=0; for(i=0;i<20;i++) { switch(i){ case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break;} printf(%d,,i); } }
Reveal answer
Fill a bubble to check yourself
What will be the output of the following function?
main() { int i=0; for(i=0;i<20;i++) { switch(i){ case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break;} printf(%d,,i); } }