Question: 1 #include 2 #include 3 4 char x[] = 365; 5 char y[] = 66; 6 int main() { 7 FILE *f1 = fopen(myfile.txt, w);

1 #include

2 #include

3

4 char x[] = "365";

5 char y[] = "66";

6 int main() {

7 FILE *f1 = fopen("myfile.txt", "w");

8 fprintf(f1, "%s", x);

9 remove("myfile.txt");

10 fprintf(f1, "%s", x);

11 FILE *f2 = fopen("myfile.txt", "w");

12 fprintf(f2, "%s", y);

......

Assume the content of myfile.txt is abc before executing the program above. Assume theres no error happening in all file I/O function call. Please answer the content of myfile.txt after running line 12?

would the content of the file would be 665365?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!