Guest User

Untitled

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