How to check endian-ness of CPU
C program to do the same
#include <stdio.h> int main() { int number = 0x1234; char * c_ptr = (char * ) & number; if (c_ptr[0] == 0x34) { printf(“CPU is Little Endian\ n”); } else { printf(“CPU is Big Endian\ n”); } return 0; }
goli202084 Edited answer