Created
March 22, 2019 14:14
-
-
Save agluszak/d2e3309dc2b516b64c946b4553b783fa to your computer and use it in GitHub Desktop.
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<byteswap.h> | |
#include<stdio.h> | |
int main(int argc, char** argv) { | |
if (argc != 2) return 1; | |
FILE* ptr = fopen(argv[1], "rb"); | |
unsigned int num; | |
while(fread(&num, sizeof(int), 1, ptr) != 0) { | |
printf("%d\n", bswap_32(num)); | |
} | |
fclose(ptr); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment