|
From: Ioannis V. <no...@ya...> - 2001-10-19 14:52:53
|
signed integer variables can store both positive and negative variables, unsigned only positive.=20 e.g. int x; signed int x; // They are both the same unsigned int x; long y; signed long y; // They are both the same unsigned long y; In the case of int the "int" can be avoided: int x; signed x; // They are both the same unsigned x; Also normally we do not use signed but only unsigned when we need so: int x; // signed long y; //signed unsigned z; // unsigned int unsigned long y; unsigned char c; But a char it can be signed or unsigned. It depends from the system. E.g. char c; // it can be signed or unsigned signed char c; // signed unsigned char c; // unsigned Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of mi...@ju... > Sent: Friday, October 19, 2001 1:36 PM > To: dev...@li... > Subject: [Dev-C++] Unsigned and signed >=20 >=20 > What do unsigned and signed do to variables?=20 > ________________________________________________________________ > GET INTERNET ACCESS FROM JUNO! > Juno offers FREE or PREMIUM Internet access for less! > Join Juno today! For your FREE software, visit:=20 > http://dl.www.juno.com/get/web/. >=20 >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >=20 |