comp.lang.c
[Top] [All Lists]

Re: printf and cout

Subject: Re: printf and cout
From: Richard Heathfield
Date: Wed, 26 Mar 2008 10:01:33 +0000
Newsgroups: comp.lang.c

laikon said:

<snip>
 
> I just know:
> 
> the printed '?' does not mean to be the result of the overflow, but a
> symbol of unknown ascii character.

There aren't any unknown ASCII characters. If the printed '?' /is/ an ASCII 
character, then it has code point 63. If it hasn't, then it isn't an ASCII 
character.

> when a number overflows by char,
> and the left binary is negate, the printf will print '?'.

No, printf offers no such guarantee.

-- 
Richard Heathfield <http://www.cpax.org.uk>
Email: -                                www">http://www. +rjh@
Google users: <                                www.cpax.org.uk/prg/writings/googly.php">http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy