None of the statements except those inside the 'case' executes....according
to the input, the default case gets executed which is the inner switch which
prints nine......

On Wed, Mar 23, 2011 at 8:46 PM, cegprakash <[email protected]> wrote:

> i=9;
>    switch(i){
>              xxx: printf("default");
>              yyy:printf("hello");
>              asdfasdf: printf("why no errors and why not printed");
>              case '1': printf("one");
>
>          default:
>          switch(i){
>
>               case '1': printf("one"); break;
>               case '2': printf("two"); break;
>               case 9: printf("nine"); break;
>          }
>           break;
>     }
>
> the output is "nine"
>
> why no errors for the above code?
> now someone tell what are the dummy labels xxx yyy and why they are
> not executed?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
A.Balaji

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to