Declarations are processed at compile time and do not depend on the execution flow of your code. Since b is declared within the local scope of the switch block, it is useable anywhere in that block from the point of its declaration.
All code in my posts, unless a source is explicitly mentioned, is my own.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop