fork(1) download
  1. #include<stdio.h>
  2. #include <stdlib.h>
  3. void print(int *matriz, int lin, int col) {
  4. for(int i = 0; i < lin; i++) {
  5. for(int j = 0; j < col; j++) {
  6. printf("%d, ", *(matriz + i * col + j));
  7. }
  8. }
  9. }
  10.  
  11. int main() {
  12. int * a = malloc(9 * sizeof(int));
  13. print(a, 3, 3);
  14. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
0, 0, 0, 0, 0, 0, 0, 0, 0,