Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int someArray[5] = {1,2,3,4,5};
- typedef int* pInt;
- pInt test = (pInt)&someArray;
- void putint(int a) { printf("%d ", a); }
- int main(int argc, char **argv){
- int i;
- for(i=0; i<5; i++) putint(test[i]); // returns "1 2 3 4 5 "
- putchar('\n');
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment