Date: Thu, 29 May 1997 18:10:28 -0800 (AKDT) From: Steve Howe <un_x@anchorage.net> To: freebsd-hackers <hackers@freebsd.org> Subject: cc/gcc Message-ID: <Pine.BSF.3.95q.970529180401.8774A-100000@aak.anchorage.net>
next in thread | raw e-mail | index | archive | help
with cc/gcc, i get outputs of "1" and "0" respectively. why?
is this construct ABSOLUTELY incorrect, or is something else amuck?
/*****************************************************************************/
#include "stdio.h"
/*****************************************************************************/
void main (unsigned char argc, unsigned char **argv) {
unsigned char a, b, c;
a = 1; b = 1; c = 0;
c = a == b == 1 ? 1 : 0 ; printf(" %i\n", c);
a='1'; b='1'; c = 0;
c = a == b == '1' ? '1' : '0'; printf(" %c\n", c);
exit( 0 );}
/*****************************************************************************/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970529180401.8774A-100000>
