Steve Searle wrote:
> Around 08:56pm on Thursday, June 18, 2009 (UK time), ayyaz scrawled:
>
>> switch (choice = getchar()) {
>> case 'r':
>>
>> case 'R':
>> printf("RED");
>> break;
>>
>> case 'w':
>>
>> case 'W':
>> printf("WHITE");
>> break;
>> }
>
>> Should it not only output 'RED' or 'WHITE' when you enter 'R' or 'W'?
>
> You don't have a break following the case 'r': and case 'w': statements.
> So control passes to the next statement - the corrosponding upper case
> ones.
>
> Steve
>
1) Why does control pass it to the next statement when the next
statement is 'R' which is not equivalent to 'r'?
2) Dumb question, but how do you directly post to this list? What is the
mailing list address? I am using this list by just replying to one of
the message.
Thanks,
--ayyaz