I started C++ recently and while learning switch case, I got this doubt. What\'s the difference if I use int or char in the following code : int Fav_Car;
int Fav_Car;
Why does it happen? Because in your switch case, you use a char, not int.
What is the difference between them?
1 //int '1' // char 1 "1" // string 1
To use int
int a; switch(a){ case 1 : }