fork download
  1. #include <stdio.h>
  2. void print_str(char **pps,int cnt);
  3.  
  4.  
  5. int main(void)
  6. {
  7. char *ptr_ary[]={"eagle", "tiger","lion","squirrel"};
  8. int count;
  9.  
  10. count=sizeof(ptr_ary)/sizeof(ptr_ary[0]);
  11. print_str(ptr_ary,count);
  12.  
  13. return 0;
  14. }
  15.  
  16. void print_str(char **pps,int cnt)
  17. {
  18. int i;
  19.  
  20. for(i=0;i<cnt;i++)
  21. {
  22. printf("%s\n",pps[i]);
  23. }
  24. }
  25.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
eagle
tiger
lion
squirrel