Re: endianness and sscanf/sprintf

From: EventHelix.com (eventhelix_at_hotmail.com)
Date: 01/02/04


Date: 1 Jan 2004 20:58:16 -0800

Richard Heathfield <invalid@address.co.uk.invalid> wrote in message news:<3ff42d01@news2.power.net.uk>...
> EventHelix.com wrote:
>
> > You will be fine as everything is being converted to characters.
> > As long as characters are represented as 8 bytes, the numbers
> > will be interpreted correctly.
>
> In C (and, as far as I am aware, C++ too), characters are always represented
> in a single byte. Character /constants/ are represented (in C, but not C++)
> by the int type, which might conceivably be eight bytes. Is that what you
> meant?
>
> (Followups set to comp.lang.c)

Typo: it should have been "8 bits" (i.e. byte).

Sandeep