fork download
  1. #include <stdio.h>
  2.  
  3. void f(void *a,int x,int y)
  4. {
  5. int (*b)[y] = a;
  6. for(int n=0;n<x;++n,puts(""))for(int m=0;m<y;++m)printf("%d",b[n][m]);
  7. }
  8.  
  9. int main(void) {
  10. int x,y;
  11. x = 2;
  12. y = 3;
  13. f((int[][3]){
  14. {1,2,3},
  15. {9,8,7}
  16. },
  17. x,y);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
123
987