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

Re: printf and cout

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

santosh said:
> laikon wrote:
> 
<snip>
>> 
>> int c = 400;
>> printf("%c", c);
>> 
>> it print ? on screen, and ascii of '?' is 63.
> 
> No, actually it prints a ? character, which is not defined either in the
> basic C character set or in ASCII.

The '?' question mark *is* in fact part of the basic C character set. It is 
used in trigraphs, and as part of the ? : conditional operator.

<snip>

-- 
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