Created
December 16, 2017 07:45
-
-
Save sham1/278b40030299f41c2331de63e254e7dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <inttypes.h> | |
#include <stdio.h> | |
void main(void) | |
{ | |
uint16_t low_short = (union{uint16_t shorts[2];uint32_t i;}) | |
{.i = 0xDEADBEEF}.shorts[0]; | |
printf("0x%"PRIX16"\n", low_short); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment