views:

71

answers:

2

Possible Duplicate:
break in a case with return.. and for default

If I have a switch statement:

switch()
{
    case 1: ...
    case 2: ...
    ...
    default:
        break;
}

Is there any reason for the break in the default clause? I see this in quite a few places, but isn't it unnecessary? What is the general practice?

Can another case label come after the default clause?

A: 

Possible duplicate.

bdhar
More of a comment than an answer.
GMan
Oops.. sorry.. let me not repeat this again!!
bdhar
No problem man.
ckv
+2  A: 

Can another case label come after the default clause?

Yes, you are allowed to place the default clause anywhere within the switch block.

R Samuel Klatchko