Re: endianness and sscanf/sprintf

From: Richard Heathfield (invalid_at_address.co.uk.invalid)
Date: 01/01/04


Date: Thu, 01 Jan 2004 14:30:27 +0000

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)

-- 
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


Relevant Pages

  • Re: OE v.6 - MIME/Quoted Printable?
    ... And I hope I haven't missed a FAQ somewhere ... found "OE-QuoteFix", ... characters when I hit "Reply Group". ... my OE news font set to 14 pt. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Debug Assertion Failure on gets(char) function
    ... Output_File is a global char. ... A string with N "payload" characters requires ... zero byte '\0' follows the last payload character. ... in the FAQ. ...
    (comp.lang.c)
  • Re: OE v.6 - MIME/Quoted Printable?
    ... And I hope I haven't missed a FAQ somewhere ... "MIME/Quoted Printable design issue". ... characters when I hit "Reply Group". ... my OE news font set to 14 pt. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: FileSize() function
    ... When counting characters, the O.S. may translate ... into memory, the safe technique is to allocate some N ... C++ Faq: http://www.parashift.com/c++-faq-lite C Faq: http://www.eskimo.com/~scs/c-faq/top.html alt.comp.lang.learn.c-c++ faq: ... Other sites: http://www.josuttis.com -- C++ STL Library book http://www.sgi.com/tech/stl -- Standard Template Library ...
    (comp.lang.cpp)
  • Re: OE v.6 - MIME/Quoted Printable?
    ... And I hope I haven't missed a FAQ somewhere ... "MIME/Quoted Printable design issue". ... found "OE-QuoteFix", ... characters when I hit "Reply Group". ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)