vinifr

array ponteiro

Jan 16th, 2016
111
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     char buf[10] = {'0','1','2','3','4','5','6','7','8','9'};
  6.     char *ptr;
  7.     int **matrix;
  8.    
  9.     ptr = buf;
  10.     matrix = (int**)ptr;
  11.    
  12.     printf("%c %c\n", matrix[0][0], matrix[0][1]);
  13.     return 0;
  14. }
RAW Paste Data