#include <stdio.h>
#include <string.h>
int main(void)
{
FILE *fp1, *fp2;
char fname1[256], fname2[256], fname3[256], str[256];
int ch, line, col, linecnt=1, colcnt=1, out=0;
if ((fp1
= fopen(fname1
, "rt")) == NULL
) { printf("Can't open input file(%s)\n", fname1
); return 1;
}
if ((fp2
= fopen(fname2
, "w")) == NULL
) { printf("Can't open output file(%s)\n", fname2
); return 1;
}
// printf("insert col:"); scanf("%d", &col);###
col = 1;
while ((ch
= fgetc(fp1
)) != EOF
) { if (out == 0 && line == linecnt && col == colcnt){
// fprintf(fp2,"%s",str);###
out = 1;
}
if (ch == '\n') {
linecnt++;
colcnt = 1;
}else{
colcnt++;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KIAppbnQgbWFpbih2b2lkKQp7CiAgRklMRSAqZnAxLCAqZnAyOwogIGNoYXIgZm5hbWUxWzI1Nl0sIGZuYW1lMlsyNTZdLCBmbmFtZTNbMjU2XSwgc3RyWzI1Nl07CiAgaW50IGNoLCBsaW5lLCBjb2wsIGxpbmVjbnQ9MSwgY29sY250PTEsIG91dD0wOwogCiAgcHJpbnRmKCJmaWxlbmFtZToiKTsgc2NhbmYoIiVzIiwgZm5hbWUxKTsKICBpZiAoKGZwMSA9IGZvcGVuKGZuYW1lMSwgInJ0IikpID09IE5VTEwpIHsKICAgIHByaW50ZigiQ2FuJ3Qgb3BlbiBpbnB1dCBmaWxlKCVzKVxuIiwgZm5hbWUxKTsKICAgIHJldHVybiAxOwogIH0KICBzdHJjcHkoZm5hbWUyLCBmbmFtZTEpOwogIHN0cmNhdChmbmFtZTIsICIub3V0Iik7CiAgaWYgKChmcDIgPSBmb3BlbihmbmFtZTIsICJ3IikpID09IE5VTEwpIHsKICAgIHByaW50ZigiQ2FuJ3Qgb3BlbiBvdXRwdXQgZmlsZSglcylcbiIsIGZuYW1lMik7CiAgICBmY2xvc2UoZnAxKTsKICAgIHJldHVybiAxOwogIH0KIAog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