Re: [Dev-C++] Shift operators portability
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Michael D. S. <for...@hi...> - 2003-09-23 14:56:23
|
Prints little endian. I have no idea why :)
ms
At 06:03 AM 9/23/03, you wrote:
> > I have an AMD processor and no idea if it's big or little endian.
>
>main() {
> int x = 1;
> if (*(char *)&x == 1) {
> printf("little-endian\n");
> } else {
> printf("big-endian\n");
> }
>}
>
>
>Regards,
> Neszt Tibor
|