/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
#include <stdint.h>
int main()
{
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define LSB 0
#define MSB 1
#else
#define LSB 1
#define MSB 0
#endif
union
{
int16_t word ;
uint8_t byte[2] ;
} reinterpret ;
reinterpret.byte[MSB] = 0x80u ;
reinterpret.byte[LSB] = 0xFFu ;
short word = reinterpret.word ;
printf( "%hX %hd\n", word, word ) ;
return 0;
}