| www.delorie.com/archives/browse.cgi | search |
| From: | bje AT cygnus DOT com (Ben Elliston) |
| Subject: | Re: console 'Got 1' |
| 20 Sep 1998 15:48:05 -0700 : | |
| Message-ID: | <Pine.LNX.3.95.980921082548.22245D-100000.cygnus.cygwin32.developers@moshpit.cygnus.com> |
| References: | <m0zKpoF-00110gC AT malasada DOT lava DOT net> |
| Mime-Version: | 1.0 |
| To: | Tim Newsham <newsham AT lava DOT net> |
| Cc: | cygwin32-developers AT cygnus DOT com |
> printf("%c%c\n", 1, 2);
> to the console window, it will say "Got 1" and "Got 2" instead of
> printing out the characters 1 and 2. This can be confusing :)
Actually, Control-A and Control-B are probably non-printable. Your code
snippet won't print out the characters `1' and `2'. It will print out the
characters whose ASCII values are 0x01 and 0x02.
Nevertheless, you've raised an interesting point.
Ben
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |