fork(1) 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++) {
  7. printf("\t%d", mtr[lin][col]);
  8. }
  9. printf("\n");
  10. }
  11. }
  12.  
  13. int main () {
  14. int mtr[3][4];
  15. int cont = 0;
  16. for (int lin = 0; lin < 3; lin++) {
  17. for (int col = 0; col < 4; col++) {
  18. mtr[lin][col] = cont++;
  19. }
  20. }
  21. matriz_ponteiro(mtr);
  22. }
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
	0	1	2	3
	4	5	6	7
	8	9	10	11