Should we break the default case in switch statement?

Should we use a break; in the last default case?

From The C programming language – Second edition (K&R 2):

Chapter 3.4 Switch

As a matter of good form, put a break after the last case (the default
here) even though it’s logically unnecessary. Some day when another
case gets added at the end, this bit of defensive programming will
save you.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)