#include <stdio.h>
int main(void)
{
char str[2][10];
const char *fname = "tango.txt";
FILE
*fp
= fopen(fname
, "r"); if (!fp) {
return -1;
}
while (fscanf(fp
, "%s %s", str
[0], str
[1]) != EOF
) { printf("%s %s\n", str
[0], str
[1]); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKQp7CiAgICBjaGFyIHN0clsyXVsxMF07CiAgICBjb25zdCBjaGFyICpmbmFtZSA9ICJ0YW5nby50eHQiOwoKICAgIEZJTEUgKmZwID0gZm9wZW4oZm5hbWUsICJyIik7CiAgICBpZiAoIWZwKSB7CiAgICAgICAgcmV0dXJuIC0xOwogICAgfQoKICAgIHdoaWxlIChmc2NhbmYoZnAsICIlcyAlcyIsIHN0clswXSwgc3RyWzFdKSAhPSBFT0YpIHsKICAgICAgICBwcmludGYoIiVzICVzXG4iLCBzdHJbMF0sIHN0clsxXSk7CiAgICB9CgogICAgZmNsb3NlKGZwKTsKICAgIHJldHVybiAwOwp9