Problem regarding the command-line parameter

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

1. Your task for this assignment is to create, in C89, a stand-alone spell-checker program. There is some pre-existing code - check.c and check.h - to help with this.

2. Program Outline

Your program will deal with three input files: a text file to check (the "user file"), a dictionary file containing correct spellings, and a settings file. The words in the user file will be spell-checked, and any resulting corrections written back to that file. Your program must do the following:

(a) Take one command-line parameter - the name of the user file to be spellchecked.

(b) Read the settings file "spellrc" and store its contents in a struct. The format of the settings file is described in Section 2.1. In brief, it contains the following information:

  • The name of the dictionary file;
  • Whether or not to auto-correct the spelling; and
  • The maximum difference between a misspelled word and any suggested correction.

(c) Read the dictionary file (whose name is given inside the settings file), placing each dictionary word into a linked list. The dictionary file contains words separated by line breaks. Once the whole dictionary file has been read, your program should copy the contents of the linked list to a dynamically-allocated array.

(d) Read the user file in the same fashion. For the sake of simplicity, assume that the file consists entirely of words separated by whitespace. (That is, you do not have to make special allowances for punctuation, though you can if you wish.)

(e) Invoke the pre-existing function check(), providing a callback (pointer to a function). The check() function is described in Section 2.2, and the callback function in Section 2.3.

(f) Write the user file array (whose contents may have been corrected) back to the user file. This obviously has to happen after the check() function has finished.

For the sake of simplicity, you do not need to preserve the original formatting.

Reference no: EM13938660

Questions Cloud

How big data can be used in decision making : You are to write a report on how Big Data can be used in Decision making. Select a Big Data use case/ case study and your task includes to define the technology stack and required data and analytics architecture
Techniques of knowledge management and knowledge discovery : Evaluate and examine the major principles and techniques of knowledge management and knowledge discovery through different applications, processes and technologies.
Which type of evidence regarding the validity of the letter : Perry Prose is in possession of a letter allegedly written by President Theodore Roosevelt during his time in office. He has taken the letter to a number of experts, who have examined the paper, ink, handwriting, and content of the letter in an at..
Does it seem to you that alan is actively listening : From the interaction, does it seem to you that Alan is actively listening? Why or why not?
Problem regarding the command-line parameter : Your program will deal with three input files: a text file to check (the "user file"), a dictionary file containing correct spellings, and a settings file. The words in the user file will be spell-checked, and any resulting corrections written bac..
Classify precise comments by alan that show either : Classify precise comments by Alan that show either he is effectively listening to his employees or that he is not.
Survey and the other research proposal : Hi, This subject has two assessments , one literature survey and the other research proposal. I have already submitted the literature survey and he gave 17 out of 35. This research proposal is based on that literature survey ,and this proposal is ..
Calculate the fixed overhead spending and volume variances : Calculate the fixed overhead spending and volume variances for the Little Rock and Athens plants. What is the most likely cause of the spending variance? Why are the volume variances different for the two plants?
Declared the dividend on the preferred stock : Organize the transaction data in accounts under an accounting equation. Prepare the stockholders equity section of the balance sheet at December 31, 2012.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  The program will read integers values

Write a C++ program to do the following. The program will read integers values one at a time from standard input (cin) until you read the value 150. assume that the number of values read in is at least 1 and less than or equal to 100

  Departmental store in shanghai

Shopping Spree is a leading departmental store in Shanghai. The store has a number of regular customers who purchase bulk items. The store also conducts regular feedback sessions to analyze customer satisfaction levels.

  How many students he wants to add to each course

I need a program that will ask the user how many courses he wants to input and how many students he wants to add to each course and the name of each student.

  Design and implement a dynamic doubly linked list

Design and implement a dynamic doubly linked list - Allocate and de-allocate memory at runtime - Analyze a basic set of requirements for a problem

  C program that compare the time required

Write a C program that compare the time required to compute the product of two 10,000 x 10,000 matrices with and without optimization for locality.

  What are the primary differences between object-oriented

1. what is instruction explosion?2. what are the primary differences between object-oriented programming languages and

  How to compile your program

how to compile your program (including the actual compile command) and how to run it (including command line arguments, if any) A description of your solution to these two problems, including what you did to solve the problem, and why you did it that..

  Express the definition of the class rectangletype

The definition of the class rectangleType and the definitions of the operator functions are.

  Provide a class diagram for every user authored class

Examine the sample code you have been provided with. This code is for a simple Car Hire management system. It contains a number of classes.

  Statements that return container data only return container

Make sure all return statements that return container data only return container data.  If a return statement returns container data under certain conditions, but another return statement returns something that is not container data under other condi..

  Write a program that creates a picture of a mountain panoram

Write a program that creates a picture of a mountain panorama from a height profile entered by the user and Implement the picture as an array of 5 strings. Every string must initially be filled with 60 space symbols. Space symbols represent the sk..

  How many times will jump be displayed

Write an if statement that assigns 15 to x when y is greater than or equal to or 7 and how many times will "jump" be displayed in the following program segment? If the loop doesn't terminate, write "infinite".

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