On many systems a char is one byte and an int is four bytes. So, no difference?Unlike Pascal or Basic, in C there's no different between char and integer.
That's not true. Assuming that you meant "cin >> C" on your second line, to go with how you declared C on the line above, cin is expecting a character. If you press '1' on the keyboard, the ASCII code for '1' is what is stored in C. If you look at the bit pattern it would be the bit pattern for 49, the ASCII code for the character '1', not the numeral 1.Stephanus said:char C;
cin >> c
cin would expect an integer value.
If you type 1
cin would translate it to ascii 1, not ascii 49, character '1'