Created
August 29, 2012 19:52
-
-
Save lasarus/3517950 to your computer and use it in GitHub Desktop.
Adding numbers in C without "+"
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 <stdio.h> | |
/* DISCLAIMER: THIS IS NOT MEANT TO BE USED IN REAL PROGRAMS */ | |
int main(int argc, char ** argv) | |
{ | |
void * a = (void *)10; | |
void * b = (void *)5; | |
void * r; | |
r = &(((char *)a)[(size_t)b]); | |
printf("%i\n", (size_t)r); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment