4. On executing the below program what will be the contents of 'target.Txt' file if the source file contains a line "to err is human"? #include int main() { int i, fss; char ch, source[20] = "source.Txt", target[20]="target.Txt", t; file *fs, *ft; fs = fopen(source, "r"); ft = fopen(target, "w"); while(1) { ch=getc(fs); if(ch==eof) break; else { fseek(fs, 4l, seek_cur); fputc(ch, ft); } } return 0; } r n trh err none of above
Answers
Answered by
0
On executing the below program what will be the contents of 'target.Txt' file if the source file contains a line "to err is human"? #include int main() { int i, fss; char ch, source[20] = "source.Txt", target[20]="target.Txt", t; file *fs, *ft; fs = fopen(source, "r"); ft = fopen(target, "w"); while(1) { ch=getc(fs); if(ch==eof) break; else { fseek(fs)
Similar questions