Skip to content

Instantly share code, notes, and snippets.

@abatilo
Created January 15, 2016 07:12
Show Gist options
  • Save abatilo/652925f3de6ca6cee348 to your computer and use it in GitHub Desktop.
Save abatilo/652925f3de6ca6cee348 to your computer and use it in GitHub Desktop.
#include <stdio.h>
typedef struct {
double t;
} temp;
int main() {
temp a, b;
a.t = 999999999999999999;
b.t = 1000000000000000000;
for (size_t i = 0; i < sizeof(double); ++i) {
printf("%4d - %4d\n", *((char *)&a + i), *((char *)&b + i));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment