The break statement here breaks out of the do loop so the o/p hello hmmm
give a break statement after hello and you will get only hello.

PS:Seeing the number of C questions wont it be a better idea to start a
parallel group especially for the same?My request to the group admins for
the same.

On Sat, Jul 23, 2011 at 8:47 PM, geek forgeek <geekhori...@gmail.com> wrote:

> #include<stdio.h>
> main()
> {
>     int i=3;
>     switch(i)
>     {
>         do
>         {
>             case 3: printf("\nhello");
>             case 2:printf("\n hmmmm");
>                     break;
>             case 1:printf("wat");
>                     break;
>             case 0: printf("hai");
>         }while(i--);
>     }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

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

Reply via email to