Breaking News
Loading...

How to find out if a processor is Little-Endian Big-Endian


#include<stdio.h>

main()
{
   int num = 1;
   if(*(char *)&num == 1)
   {
      printf("\nLittle-Endian\n");
   }
   else
  {
      printf("Big-Endian\n");
  }

0 comments:

Post a Comment

 
Toggle Footer