Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!elsie!ado From: ado@elsie.UUCP Newsgroups: comp.lang.c Subject: question on unsigned short vs. negative constant Message-ID: <7392@elsie.UUCP> Date: Thu, 23-Apr-87 16:38:04 EST Article-I.D.: elsie.7392 Posted: Thu Apr 23 16:38:04 1987 Date-Received: Sat, 25-Apr-87 06:48:22 EST Followup-To: poster Organization: NIH-LEC, Bethesda, MD Lines: 18 In environments where sizeof short < sizeof int, what output should the program #include "stdio.h" main() { unsigned short us; us = ~0; (void) printf("%d\n", us == -1); } produce? What output does it produce on your system? If you have answers, I'd appreciate hearing from you by mail. -- UUCP: ..seismo!elsie!ado ARPA: elsie!ado@seismo.CSS.GOV Elsie and Ado are trademarks of Borden, Inc. and Ampex.