Skip to content

Instantly share code, notes, and snippets.

@misyltoad
Created February 3, 2018 17:53
Show Gist options
  • Save misyltoad/97b725d72d5eabb7e53cbb3d75045b2f to your computer and use it in GitHub Desktop.
Save misyltoad/97b725d72d5eabb7e53cbb3d75045b2f to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdint.h>
int main()
{
uint64_t a;
*((int32_t*)(&a)) = 1;
*(((int32_t*)(&a)+1)) = 1;
for (int i = 0; i < 32; i++)
{
printf("%d, %d, ", *(((int32_t*)(&a))), *(((int32_t*)(&a)+1)));
*(((int32_t*)(&a))) = *((int32_t*)(&a)) + *(((int32_t*)(&a)+1));
*(((int32_t*)(&a) + 1)) = *((int32_t*)(&a)) + *(((int32_t*)(&a)+1));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment