fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. char str[2][10];
  6. const char *fname = "tango.txt";
  7.  
  8. FILE *fp = fopen(fname, "r");
  9. if (!fp) {
  10. return -1;
  11. }
  12.  
  13. while (fscanf(fp, "%s %s", str[0], str[1]) != EOF) {
  14. printf("%s %s\n", str[0], str[1]);
  15. }
  16.  
  17. fclose(fp);
  18. return 0;
  19. }
Runtime error #stdin #stdout 0.02s 1804KB
stdin
Standard input is empty
stdout
Standard output is empty