[Dev-C++] Error while doing a simple example
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Christian S. <sm...@xs...> - 2003-05-20 21:23:07
|
Hi,
From the book learn C in 24 hours I typed this lesson and build/run it:
#include <stdio.h>
main ( )
{
int x;
unsigned int y;
x = 0xAB78;
y = 0xAB78u;
printf ("De decimal value of 0xAB78 is: %d.\n", x);
printf ("De decimal value of 0xAB78u is: %u.\n", y);
return 0;
}
However this returns me for both statments (printf's): 43896 but the book
tells me it should return -21640 for the signed integer (first printf).
I'm using:
Windows 2000 SP3
PIII 550 MHz
DevC++ 4.9.8.0
Could anyone tell where my mistake is?
Thanks in advance.
|