Given
signed char str_a[]="Hello, world!\n";
unsigned char str_b[]="Hello, world!\n";
what is the difference, if any, between the following two statements?
printf( "%s", str_a );
printf( "%s", str_b );
If there is a difference, what is the best way to compare *str_a with
0xFF? (On my implementation, unadorned char is signed, and so I'm
using
if( *str_a == (signed char)0xFF ) ...
to quiet compiler warnings.)
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
signed char str_a[]="Hello, world!\n";
unsigned char str_b[]="Hello, world!\n";
what is the difference, if any, between the following two statements?
printf( "%s", str_a );
printf( "%s", str_b );
If there is a difference, what is the best way to compare *str_a with
0xFF? (On my implementation, unadorned char is signed, and so I'm
using
if( *str_a == (signed char)0xFF ) ...
to quiet compiler warnings.)
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Comment