Advertisement
Guest User

Untitled

a guest
Sep 13th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. void func( int (*a)[5] )
  5. {
  6.     int i,j;
  7.     int total=0;
  8.  
  9.     for(i = 0; i < 5; i++)
  10.         for(j = 0; j < 5; j++)
  11.             a[i][j] = total++;
  12. }
  13.  
  14.  
  15.  
  16. int main()
  17. {
  18.     int b[5][5];
  19.     int i,j;
  20.  
  21.     func(b);
  22.  
  23.     for(i = 0; i < 5; i++)
  24.         for(j = 0; j < 5; j++)
  25.             printf("%d\n", b[i][j]);
  26.  
  27.     return(0);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement