![]() ![]() Suppose the test expression contains value 4. ![]() Whenever the switch is executed, the value of test-expression is compared with all the cases which we have defined inside the switch.A block is nothing but multiple statements which are grouped for a particular case.Each of these cases is associated with a block. Case labels always end with a colon ( : ).This creates problems in the program and does not provide the desired output. Then while executing the program, the case that appears first will be executed even though you want the program to execute a second case. Suppose we have two cases with the same label as ‘1’. Remember that case labels should not be same as it may create a problem while executing a program. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |