Home > Back-end >  Endl and ""
Endl and ""

Time:03-13

Int main ()
{char a;
For (a=32; a<=127; +)
{cout} this program will run infinite loop, but the last sentence into a
Cout CodePudding user response:

The char type for - the range of 128-127, the for (a=32; a<=127; +) condition is a<=127, so when a=128 beyond, a value is not correct, such as changing the conditions to the for (a=32; a<127; +) is normal, or change the type of a to unsigned char (range of 0 ~ 255) can also be normal,
  • Related