Question
The file shakespeare.txt contains 36 of Shakespeare's earliest performances. You have also written a play and want to write it to this file as well
The file "shakespeare.txt" contains 36 of Shakespeare's earliest performances. You have also written a play and want to write it to this file as well with the help of a C program. How many plays are in the file in the end? ------------------------------------------------ ... // open file for writing file = fopen("shakespeare.txt", "w");
// add my play to shakespeare's works fprintf(file, "%s", my_magnum_opus);
// close file fclose(file);
How many plays this given code would output A : 1 B : 2 C : 3 D : 36 E : 37
I just need to know how many plays this given code would output. I think that the file "shakespeare.txt" with the specified "w" (file =fopen("shakespeare.txt", "w")) is deleted. So the result should be 1 (A). But I am not sure.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started