machine endianess

This commit is contained in:
2024-02-29 10:59:49 +05:30
parent dc5620324b
commit ba495cf210
5 changed files with 103 additions and 0 deletions

33
endianess/main.c Normal file
View File

@@ -0,0 +1,33 @@
/*
* =====================================================================================
*
* Filename: main.c
*
* Description:
*
* Version: 1.0
* Created: 29/02/24 10:31:18 AM IST
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organization:
*
* =====================================================================================
*/
#include "endian.h"
#include <stdio.h>
int main(){
int val = machine_endianness_type();
if( val ){
printf("Little endian machine\n");
}
else{
printf("Bit endian machine\n");
}
return 0;
}