Ask the user for a substring to search for calculate and


PROGRAM MUST BE IN C.

Decl of Indep.txt file has been included at the bottom of the post. This is the text file where the substrings will be searched from.

Please do not use fscan() for the program.

An overview for the program:

1) Ask the user for the name of the input file.

a) If the file is not present or cannot be opened allow for an error message to be displayed.

2) Ask the user for a substring to search for.

3) Calculate and display the found occurrences of the substring in the file. For each found occurrence, your program should display (a) the location number starting at 1 and going up to the total number of locations found, and (b) the portion of the string containing the found substring.

This portion should consist of the substring and 8 characters before and 8 characters after the found substring.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Ask the user for a substring to search for calculate and
Reference No:- TGS02900717

Expected delivery within 24 Hours