fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void matriz_ponteiro(int mtr[3][4]) {
  5. for (int lin = 0; lin < 3; lin++) {
  6. for (int col = 0; col < 4; col++) printf("\t%d", mtr[lin][col]);
  7. printf("\n");
  8. }
  9. }
  10.  
  11. int main () {
  12. int mtr[3][4];
  13. for (int lin = 0, cont = 0; lin < 3; lin++) for (int col = 0; col < 4; col++) mtr[lin][col] = cont++;
  14. matriz_ponteiro(mtr);
  15. }
  16.  
  17. //https://pt.stackoverflow.com/q/165524/101
Success #stdin #stdout 0s 4276KB
stdin
Standard input is empty
stdout
	0	1	2	3
	4	5	6	7
	8	9	10	11