Cooler_

const string cast 2 64int

Jul 25th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. // cast trick test with strings,  by cooler_
  2. #include <stdio.h>
  3. #include <stdint.h>
  4. #include <stdlib.h>
  5.  
  6. typedef int64_t  s64;
  7.  
  8. int
  9. main()
  10. {
  11.  s64 x = *(s64*)"action=";
  12.  s64 y = *(s64*)"actions";
  13.  
  14.  char *test=(char *)&x;
  15.  puts(test);
  16.  
  17.  fprintf(stdout,"%s \n",(x==y)?"true":"false");
  18.  
  19.  return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment