Skip to content

Instantly share code, notes, and snippets.

@jagt
Created September 30, 2014 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagt/09e535f7d886df29217e to your computer and use it in GitHub Desktop.
Save jagt/09e535f7d886df29217e to your computer and use it in GitHub Desktop.
print int as float for memory edit
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int i;
float f;
if (argc < 2)
{
puts("usage: cnv 1065353216\n");
return -1;
}
i = atoi(argv[1]);
f = *((float*)(&i));
printf("%f\n", f);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment