Menu

[Solved]Write Function Called Printtofile Takes One Argument String Represents Name Text File Retu Q37217987

must be done in C
Write a function called printToFile() that takes one argument, a string that represents the name of a text file. The return tWrite a function called printToFile() that takes one argument, a string that represents the name of a text file. The return type is void. In the body of the function, open the file for appending. Then prompt the user for a name, email, and age. Store the responses to each of these prompts on separate lines in the opened file (each line ends with a newline character) and close the file. In main, call the function you wrote at least two times. After the program ends, you should see what you typed saved in the file. Show transcribed image text Write a function called printToFile() that takes one argument, a string that represents the name of a text file. The return type is void. In the body of the function, open the file for appending. Then prompt the user for a name, email, and age. Store the responses to each of these prompts on separate lines in the opened file (each line ends with a newline character) and close the file. In main, call the function you wrote at least two times. After the program ends, you should see what you typed saved in the file.

Expert Answer


Answer to Write a function called printToFile() that takes one argument, a string that represents the name of a text file. The ret… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *