2 deleted 94 characters in body
source | link

There is no break necessary after the last case. I use the word "last" (not default )because it is not necessary default case is the last case.

switch(x)
{
case 1:
//do stuff
break;

default:
//do default work
break;

case 3:
//do stuff

}

You can label the case as default anywhere in the case -list not necessarily the end. And we know, a break is necessary between totwo consecutive cases. Sometimes, I use if(a!=0) in my code for more readability when others refer my code. I can choose to use if(a), that would be a matter of my choice

There is no break necessary after the last case. I use the word "last" (not default )because it is not necessary default case is the last case.

switch(x)
{
case 1:
//do stuff
break;

default:
//do default work
break;

case 3:
//do stuff

}

You can label the case as default anywhere in the case -list not necessarily the end. And we know, a break is necessary between to consecutive cases

There is no break necessary after the last case. I use the word "last" (not default )because it is not necessary default case is the last case.

switch(x)
{
case 1:
//do stuff
break;

default:
//do default work
break;

case 3:
//do stuff

}

And we know, a break is necessary between two consecutive cases. Sometimes, I use if(a!=0) in my code for more readability when others refer my code. I can choose to use if(a), that would be a matter of my choice

1
source | link

There is no break necessary after the last case. I use the word "last" (not default )because it is not necessary default case is the last case.

switch(x)
{
case 1:
//do stuff
break;

default:
//do default work
break;

case 3:
//do stuff

}

You can label the case as default anywhere in the case -list not necessarily the end. And we know, a break is necessary between to consecutive cases