Move stack allocated C string just outside of the switch statement's scope, avoiding potential memory issue.