Calculate and display the found occurrences of the substring

Assignment Help C/C++ Programming
Reference no: EM132107262

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.

Reference no: EM132107262

Questions Cloud

Risk of developing an eating disorder : Describe demographic and psychological factors associated with a risk of developing an eating disorder.
Create two classes named as stationary and beverage : Create two classes named as ‘Stationary' and ‘Beverage'. Think of proper attributes for each class. each attribute must have a ‘name'.
What food or group of foods would you recommend : What food or group of foods would you recommend? Why? Does the food or group of foods contain dietary components that interfere with calcium absorption?
How is this food consumed in this country : Uses of the food (RICE) in 3 different countries - answer these questions. What are indicative dishes: why is this food important in these dishes?
Calculate and display the found occurrences of the substring : Ask the user for a substring to search for. Calculate and display the found occurrences of the substring in the file.
Which nutrient deficiencies cause rickets : Which nutrient deficiencies cause Rickets? How would you elucidate which nutrient deficiency was causing rickets?
Describe the role of calcium : Describe the role of calcium, phosphorous and magnesium in bone structure
What are the major functions of calcium : What are the major functions of calcium, other than its relation to bone health?
Encouraging people to lose weight : Given the potential psychological and physiological downfalls of weight loss and the fact that diets don't result in long-term weight loss

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd