Signedness of char and puts()

lynx.abraxas@freenet.de lynx.abraxas@freenet.de
Thu Apr 17 09:38:00 GMT 2008


On 28/03/08 15:13:35, Eljay Love-Jensen wrote:
> Hi Ed,
> 
> > Does anyone know why this occurs? 
> 
> Those are three different types.
> + char
> + unsigned char
> + signed char
> 
> "Hello" is a char*, not an unsigned char* or signed char*.
> 
> (In C++ "Hello" is a char const*.)

I wonder when it is improtant to distinguish between char and the signed or
unsigned version?
How should one print the acual value of a character? printf("Character value
of %s is %d.\n",
+"a", 'a')???

Thanks
Lynx



More information about the Gcc-help mailing list