fork download
  1. #include <stdio.h>
  2.  
  3. void print_many(char (*rows)[10], size_t count) {
  4. for (size_t i = 0 ; i != count ; i++) {
  5. printf("%zu: %s\n", i+1, rows[i]);
  6. }
  7. }
  8.  
  9. int main(void) {
  10. char rows[][10] = {"quick", "brown", "fox"};
  11. print_many(rows, 3);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 4316KB
stdin
Standard input is empty
stdout
1: quick
2: brown
3: fox