Telegram Group 🔥🔥🔥 Get answers in minutes
Questions answered : 48 /50
Guy
Guy
Guy
Guy
Guy
+ 4981 more
Verified Answer verified

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<stdio.h>

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;
}

🗓 Jul 11, 2021

Comments and Discussions

You don't need to login to post your comment

Comments:
30
Views:
60k
Likes:
120k
275 votes
Allison 🌐 India
Cool if had answer
Was this answer helpful?
284 votes
Deeksha 🌐 India
Can anyone please help me with the explanation?
Was this answer helpful?

Was your question answered?

Want to get famous? 📸

Answer question and get 🤩 high-lighted on our homepage.

Just Automated Logo

© 2017-2022 Foxoyo™
All rights reserved.

Facebook Connect with us