Last active
April 3, 2026 15:43
-
-
Save FleXoft/84598e57b0f553a61df489f25a8056f6 to your computer and use it in GitHub Desktop.
big-endian_testing.c
This file contains hidden or 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 <stdint.h> | |
| #include <stdio.h> | |
| int main(void) | |
| { | |
| uint32_t x = 0x12345678; | |
| int i; | |
| for (i = 0; i < sizeof(x); i++) { | |
| printf("mem[%d] = 0x%02x\n", i, ((char*)&x)[i]); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment