Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!newstop!sun!kuro From: kuro@shochu.Sun.Com (Teruhiko Kurosaka - Sun Intercon) Newsgroups: comp.std.c Subject: subtraction between unsigned ints Message-ID:Date: 5 Sep 89 18:19:40 GMT Sender: news@sun.Eng.Sun.COM Distribution: comp Organization: Sun Microsystems Inc, Mt.View, CA, USA Lines: 20 Does pANSI defines the datatype of the result of subtraction between unsigned integers? Would it be also unsigned? Then what would be the result of subtraction of a number from a smaller number? I am talking about this situation like: unsigned int u, v; long int x; u=3; v=5; x=u-v; Is x guranteed to be -2? ------- T. Kurosaka ("Kuro") --- Sun Microsystems, Intercontinental Operation Internet: kuro@Corp.Sun.Com Voice:+1(415)496 6121 Fax: +1(415)858 0284 US Mail: Mail Stop A6-18, 1870 Embarcadero Rd., Palo Alto, CA 94303, USA -- ------- T. Kurosaka ("Kuro") --- Sun Microsystems, Intercontinental Operation Internet: kuro@Corp.Sun.Com Voice:+1(415)496 6121 Fax: +1(415)858 0284 US Mail: Mail Stop A6-18, 1870 Embarcadero Rd., Palo Alto, CA 94303, USA