Determines the average length of the words in a sentence

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

please use C++ programming

Write a function that accepts a pointer to a C-string as an argument and returns the number of words contained in the string.

For instance, if the string argument is "Four score and seven years ago" the function should return the number 6.

Demonstrate the function in a program that asks the user to input a string or a file.

If the user enters a file, read the file, and submits each sentence to the function.

Write a second function that determines the average length of the words in a sentence.

For each sentence or user-entered phrase, display: the number of words and the average length of the words.

Reference no: EM132100970

Questions Cloud

What is the complexity of the switch architecture : What is the complexity of the switch architecture?Use T-S-T hybrid switch to replace the Clos space domain switch designed in part a.
What amounts need to be forwarded to an insurer : What amounts need to be forwarded to an insurer. No one is accusing Phil of stealing, but Mike is concerned. Is Mike’s concern warranted?
What is the induced loop at given points : A (17cm X 17cm) square loop lies in the xy plane The magnetic field in this region of space is B=(0.31t i + 0.55t^2 k)T where t is in seconds.
Problem related to principle of mathematical induction : Show, by the Principle of Mathematical Induction 5n + 2 * 11n is divisible by 3 for all n
Determines the average length of the words in a sentence : Write a second function that determines the average length of the words in a sentence.
Internally consistent and market competitive : Can companies easily develop compensation that is both internally consistent and market competitive?
Find gravitational potential energy of ball : A 1500 kg wrecking ball hangs from a 20 m-long cable. The ball is pulled back until the cable makes an angle of 16.0 degrees with the vertical.
Discuss the concept of social marketing : Discuss the concept of social marketing. What are some of the inherent problems with social marketing?
About the economic order quantity : Which of the following statements is NOT TRUE about The Economic Order Quantity (EOQ)

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