Useless source

Google

When I get bored, I write small proggies that do really useful thinks. But when I' m in a mood, I write tiny proggies that are completely useless.

I' ll post every useless proggy that has something to offer to the human kind. This page is a major contribution to human knowled.. whatever...


endianess.c (117 bytes) license: none

This is my first signature program. It shows if your machine is big or little endian (search "endianess" on google.com)..
Note: this signature is partly really useless, even in finding endianess. The guys at comp.lang.c pointed out that if a machine has padding bits, the code gives unreliable results.

#include <stdio.h>
#define p(s) printf(#s" endian")
int main(void){int v=1;*(char*)&v?p(Little):p(Big);return 0;}
download endianess.c.tar.gz


Send any bugs to : ipapadop |at| inf |dot| uth |dot| gr