Question: Please insert a code that will write the 4 strings to a file instead of the screen. Editable Code: ____________________________________________________________________ #include int main (void) {
Please insert a code that will write the 4 strings to a file instead of the screen.

Editable Code:
____________________________________________________________________
#include
int main (void)
{
FILE *fp_out;
char *str1 = Four score and seven years ago our;
char *str2 = fathers brought forth on this continent,;
char *str3 = a new nation, conceived in Liberty and dedicated;
char *str4 = to the proposition that all men are created equal.;
fp_out = fopen("my_file", "w");
if( fp_out != NULL )
{
// Insert your code here to write the 4 strings above to the file my_file
fclose(fp_out);
}
else printf("I couldn't open the file \"my_file\". ");
return 0;
}
_____________________________________________________________________
Thanks in advanced!
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
