#include <stdio.h>
int main(void)
{
unsigned char a;
char b;
a = '\376';
b = a;
printf("%d,%d",a,b);
return 0;
}
The answer is the book :254,-2
In pelles c:63,63 why?
You should not post stuff like this as a bug report... Pelle is way too busy to ask him to weed through this kind of problem.
Look in your project options on the compiler tab... is "Char type is unsigned" checked?
If so uncheck it; your b variable is a signed character.
For what it's worth...
warning #2223: Unable to convert character '\u00fe' to codepage 936; using default character.
why?
The problem here seems to be the regional settings of your system, which seem to be for an Asian language.
For what it's worth... http://msdn.microsoft.com/en-US/goglobal/cc305153
Apparently \376 = 0xFe = 254, doesn't map to any character on that code page.
Thank you very much!!