I am coding a C code and I want to compare the hexadecimal value of some character with an other. That is working, but with somme value like �
I obtained a value on 4 bytes which create a no sense in my comparaison.
void obs_text(char* start, unsigned char debugLevel, unsigned char depth){
printf("%c -> 0x%x\n", start[0], start[0]);
}
I expected an output with two hexadecimals characters but the actual output is ? -> 0xffffffef
.
Please does any one understand what happens ? Thank you for your help.
I am compiling with gcc.
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.3)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
but I also try on a Debian OS with the same problem