fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void)
  5. {
  6. char str1[20];
  7. char str2[20];
  8. char str3[20];
  9. char *a[] = {str1, str2, str3};
  10.  
  11. strcpy(str1, "hai");
  12. strcpy(str2, "cool");
  13. strcpy(str3, "many");
  14.  
  15. a[0][0] = 'f';
  16.  
  17. for(int i = 0; i < 3; i++)
  18. printf("%s\n", a[i]);
  19. return 0;
  20. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
fai
cool
many