fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. char *s[] = {
  6. "string1",
  7. "string2",
  8. "strin3",
  9. NULL
  10. };
  11.  
  12. printf("%d", sizeof s/sizeof (char *));
  13. for(int i=0; s[i];i++){
  14. printf("s%d: %s \n",i, s[i] );
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
4s0: string1 
s1: string2 
s2: strin3