Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.71 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4.  
  5. #define N 5
  6.  
  7. char *func(char *str1[][N], char *str2[][N])
  8. {
  9.     for (int i = 0; i < N; i++)
  10.     {
  11.         for (int j = 0; j < N; j++)
  12.         {
  13.             printf("%c", *(*(str1 + i) + j));
  14.         }
  15.         printf("\n");
  16.     }
  17.     return *str1;
  18. }
  19.  
  20. void main()
  21. {
  22.     char str1[][N] = {{"abcer"},
  23.                       {"rygqb"},
  24.                       {"iylfe"},
  25.                       {"optus"},
  26.                       {"vqdda"}};
  27.  
  28.     char str2[][N] = {{"qscbd"},
  29.                       {"tgvcs"},
  30.                       {"azzfp"},
  31.                       {"duufu"},
  32.                       {"wddda"}};
  33.  
  34.     char *res = func(str1, str2);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement