Count words and numbers in a plain text file

Assignment Help Computer Engineering
Reference no: EM132194657

Write a C++ program to count words and numbers in a plain text file. Words and numbers can be repeated. You can use any algorithm and data structures that you prefer, as long as the results are correct.

It is preferred, but not necessary, that your algorithm is as efficient as possible, both in processing time as well as memory management.

The input is one text file, with words and integers, separated by any other symbols including spaces, commas, period, parentheses and carriage returns. Keep in mind there can be be multiple separators together (e.g. many spaces, many commas together). The input is simple.

You can assume a word is a string of letters (upper and lower case) and a number a string of digits (an integer without sign). Words and numbers will be separated by at least one non-letter or one non-digit symbol. Length: You can assume one word will be at most 30 characters long and a number will have at most 10 digits.

Repeated strings: words and numbers can be repeated. However, you are not asked count distinct words or compute frequency per word, which require algorithms and data structures to be covered in the course. Therefore, you just simply need to count word or numver occurrences.

For this homework we will not ask you to consider all potential inputs. Notice you are not asked to handle floating point numbers, which require decimal point and scientific notation.

Reference no: EM132194657

Questions Cloud

What is the penguin speed : A 6.1 kg penguin is sliding on a frictionless horizontal surface with an initial speed of 7.1 m/s. A varying magnitude force is applied in the direction.
What is the role of government in a democracy : Imagine that you are trying to convince a friend or family member about the importance of voting. What would you say to them?
What kinds of political cultures do your nation-states have : What kinds of political cultures do your nation-states have? Briefly explain the reasons behind these facts.
What is the speed of the physics student : A 59 kg physics student jumps off the back of her Laser sailboat (42 kg). After she jumps, the Laser is found to be travelling at 1.5 m/s.
Count words and numbers in a plain text file : Write a C++ program to count words and numbers in a plain text file. Words and numbers can be repeated.
Compute the average value of an array of floating-point : Write a c++ program that computes the average value of an array of floating-point data.
Compute the profit made for selling goldfish flakes : Write a C# program to compute the profit made for selling goldfish flakes on-line, using Visual Studio.
Write a c program to capitalize the first character : Write a C program to capitalize the first character in each sentence from a given file.
What is the power expended by each girl : Two girls, each of weight 400N climb up a rope through a height of 8 m. We name one of the girl And other B. Girl takes 20 sec while B takes 50 sec.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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