Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 29th, 2012  |  syntax: None  |  size: 0.26 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Matrixes in contiguous position of memory
  2. int main(int argc, char **argv)
  3. {
  4.     int mat[10][10],i;
  5.     for(i=0;i<10;i++)
  6.         mat[i][0]=99;
  7.     int *ptr=&mat[0][0];
  8.     for(i=0;i<10;i++)
  9.     {
  10.         printf("%dn",*ptr);
  11.         ptr+=10;
  12.     }
  13.     return 0;
  14. }