update check endian.c

checks if a system is little endian or big endian.