One too many mornings

April 22, 2005

Default char types

Filed under: Uncategorized — admin @ 2:04 am

I learned something today. Something that dates back to the dawn of computing. In C a char can be either signed or unsigned. I had a bug were on one compiler it is signed and on another unsigned. Although today most compilers define char as signed this is left as an implementation detail (K&R second ed p.36).

So this is why they call C unportable.

Leave a Reply