1 | initial version |
You are asking a very basic general C++ programming question (stuff for the first day of a programming course - you should clearly take one), that doesn't belong in this forum.
However, the character has a value of '6' in the character set used, which represents a numeric value of 54. Switch can use any integral or enumerative variable as its argument, including ints and chars. Here, it obviously uses char, and in the switch's case statement the character's value, which can be expressed as '6' or 54.