How many times user input character is in the string

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

Question: Write a function that takes two parameters (a string of no more than 50 characters and a letter the user inputs), then returns the count of how many times user input character is in the string. If the letter is not found, the function returns -1. Example "Hello",' f' returns -1.

Use the function in main to get two inputs from the user, a sentence and a character, then show the count of that character.

Reference no: EM132312726

Questions Cloud

Define the cyber risk associated with critical networks : It is the policy of the United States to prevent or minimize disruptions to the critical national information infrastructure in order to protect the public.
Write a cover letter that is addressed to the contact person : Create a reference list with three individuals whom you could trust to provide good professional endorsements of your abilities.
Strategic innovation for businesses targeting customers : What would you consider are the conditions necessary for strategic innovation for businesses targeting customers at the bottom
Corporate sustainability for mannat : What would you consider could be the possibilities that could lead to corporate sustainability for Mannat?d to corporate sustainability for Mannat?
How many times user input character is in the string : Write a function that takes two parameters (a string of no more than 50 characters and a letter the user inputs), then returns the count of how many times user.
Abc company uses a materials requirements planning : The ABC company uses a Materials Requirements Planning (MRP) system to schedule the production of Part X and its subcomponents
What is your target market : 1. What is your target market? 2. What is the size of your target market?
How accurate and consistent data related to risk management : Explain the importance of having accurate data for performing earned value management, based on the articles provided. Provide examples on how accurate.
Can you explain corporate social responsibility : Can you explain Corporate Social Responsibility and Caroll's four model Theory of Corporate Social Responsibility

Reviews

Write a Review

C/C++ Programming Questions & Answers

  State whether the following are valid switch statements

State whether the following are valid switch statements. If not, explain why. Assume that n and digit are int variables.

  Write template classes for managing generic stacks and queue

write two template classes for managing generic stacks and queues. The maximum size of the stack or queue shall be hardcoded as 10.

  Show the contents of the id array

Show the contents of the id array after each union operation when you use the quick find algorithm (Program below) to solve the connectivity problem for the sequence 0-2, 1-4, 2-5, 3-6, 0-4, 6-0, and 1-3.

  Suggest an application system

Prompt for user login to begin using the system, provide an avenue for users to enter test data - Suggest an application system which is able to perform some arithmetic computations, like commission system, encryption system, timer system, etc, fro..

  Write a preliminary version of the program

The last payment may be less than $50 if the debt is small, but do not forget the interest. If you owe $50, then your monthly payment of $50 will not pay off your debt, although it will come close. One month's interest on $50 is only 75 cents.

  Program reads in and prints three bowling scores

The main program reads in and prints three bowling scores, score1, score2, and score3. It then calls a series of functions to process these scores.

  Would this code sequence compile? explain.

Using pseudocode or C++, write the statements to enter an integer number, compute the number raised to power 5 and output the result

  Write a cpp program to play a simple version of dice game

In this homework assignment you will write a c++ program to play a simple version of the dice game, Yahtzee. This assignment will use while loops and for loops.

  Evaluate the circumference of a circle

Write a program that will call a function to calculate the area of a circle, and call another function to calculate the circumference of a circle.

  Find the pairs in any given matrix

write a c program which will find the pairs in any given matrix, whose sum of pairs are 10.

  Make an explicit statement of the invariant of the set class

Prepare a new container class called ser, which is similar to a bag, except that a set can contain only one copy of any given item, you'll need to change the interface a bit.

  Write function that improve the performance of your program

Write another function that improve the performance of your program by using another sorting algorithm, discuss the Big O of the new algorithm use.

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