fork download
  1. #include <stdio.h>
  2. void fill (int m[][5], int n, int v);
  3. void display(const int m[2][5], int n);
  4. int main(void) {
  5. int x[2][5]={0};
  6. int y[2][5]={0};
  7. int no;
  8. scanf("%d",&no);
  9. fill(x,2,no);
  10. fill(y,2,no);
  11. return 0;
  12. }
  13. void fill(int m[][5], int n,int v){
  14. for(int i=0; i<n; i++){
  15. for(int j=0; j<5; j++){
  16. m[i][j] = v;
  17. }
  18. }
  19. }
  20. void display(const int m[2][5], int n){
  21. for(int i=0; i<n; i++){
  22. for(int j=0; j<5; j++){
  23. printf("%d",m[i][j]);
  24. }
  25. putchar('\n');
  26. }
  27. }
  28.  
Success #stdin #stdout 0s 5320KB
stdin
5
stdout
Standard output is empty