Interview Question

Software Engineer Interview San Diego, CA

How would you distinguish if the system is big endian or

  little endian
Answer

Interview Answer

1 Answer

1

bool big_endian(){
      int num=1;
      return *(char*)&num != 1;
}

Anonymous on Oct 24, 2012

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up