Now, make another modification to the code in Problem 2. Add a menu to the start of the program that gives users four options: 1 – Print out the entire book, “Robinson Crusoe” 2 – Count the number of...


Now, make another modification to the code in Problem 2. Add a menu to the start of the program that
gives users four options:
1 – Print out the entire book, “Robinson Crusoe”
2 – Count the number of words in the book “Robinson Crusoe”
4 – Exit the program


with comments


Q#include <stdio.h><br>#include <string.h><br>#define MAX 4000<br>Bint main(void)<br>|{<br>FILE* bkPtr;<br>9.<br>char buffer[MAX];<br>10<br>fopen_s(&bkPtr,

Extracted text: Q#include #include #define MAX 4000 Bint main(void) |{ FILE* bkPtr; 9. char buffer[MAX]; 10 fopen_s(&bkPtr, "defoe-robinson-103.txt", "r"); if (bkPtr == NULL) { | puts("Unable to open file."); } else { while (fgets(buffer, MAX, bkPtr)) { 11 12 13 14 15 16 17 puts(buffer); 18 19 20 fclose(bkPtr); 21 22 -日1日, 234 5n 69 00

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here