Write a c language program that searches a string

Assignment Help Computer Engineering
Reference no: EM132194492

Part 1

Write a C language program that searches a string for the last occurrence of a specified character. When it finds the character, it should print the remainder of the string. Specifically, your program should do the following:

1. Declare a string variable (character array) that can hold up to 60 characters.

2. Initialize the string variable to the following: "Chicago was known for meat packing and gangsters."

3. Prompt the user to enter a character for which to search.

4. Use the standard function to search the string for the last occurrence of this character.

5. If the character is not found, print a message to the console.

6. If the character is found, print the remainder of the string beginning at this character.

Test your program with the character 'g' and submit a printout of your program output along with a program listing.

Part 2

Modify your program so that it prints the word containing the last occurrence the character. To stop printing after the first word, test for a space a period, or a NULL after outputting each character.

Reference no: EM132194492

Questions Cloud

Transfer of training process : Is Baldwin and Ford's model of the transfer of training process is effective?
Find an element in the array using binary search : Given an array of n integers, return the average number of comparisons that would be required to successfully find an element in the array using binary search.
What is the magnitude of the force exerted on the right cube : Three identical 5.0 kg cubes are placed on a horizontal friction less surface in contact with one another. The cubes are lined up from left to right.
Bird and wildlife hazard management at airport : Describe 6 keys activities of control techniques associated with bird and wildlife hazard management at airport?
Write a c language program that searches a string : Write a C language program that searches a string for the last occurrence of a specified character
Determine the value of the constant : A particle's velocity is described by the function vx=kt^2m/s, where vx is in m/s, t is in s, and k is a constant. The particle's position at t0=0s.
Positive and negative factors of using social media : What are positive and negative factors of using social media in hospitals?
What is the new range : In the absence of air resistance, a projectile is launched from and returns to ground level. It follows a trajectory similar to that shown in the figure.
Describe the employer mandate : Describe the employer mandate. What unintended behavioral change (by employers) do you think this mandate will cause?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Questionfind nearby pair and most-distant pair from a given

questionfind nearby pair and most-distant pair from a given point.produce two random integer numbers between 1 and 200.

  Taskproceed according to the following

taskproceed according to the following instructions.1.identify a recent within the last six 6 months moral dilemma or

  Develop an online document library

Develop an online document library - create an application with the following architecture - Dockerfile exposes different ports for different APIs

  Write a program that reads data from a file

Write a program that reads data from a file, performs a units conversion, and writes the data to a new file.

  Discuss the advantages of backing up to the cloud

Discuss the advantages and disadvantages of backing up to the Cloud. minimum 150 words not including title and reference page.

  Determine the choice of direction for a particular problem

Identify and list all factors that determine the choice of direction for a particular problem.

  Discuss has facebook solved the mobile ad problem

By allowing instant access to information, online purchases, a camera, and social media, our smartphones have become a part of our daily routines

  What changes have to be made to accept $ and cents

What changes have to be made to accept $ and cents

  What situation is that you intend to improve usually

What you plan to accomplish and why, include an overview of situation or organization and what situation/problem is that you intend to improve - usually 1-2 page) Cite and support all content appropriately Should include.

  Understand business to business markets

What are the Buying Center Participants? In your opinion, which of these participants is the most important to a business-to-business marketing manager?

  How build a secure ecommerce system

select one security issue (e.g., payment security, customer privacy, and reliability) related to eCommerce systems. Which security technologies could be used to build a secure eCommerce system.

  Explain the types of employees involved in the sdlc process

Explain the types of employees involved in the SDLC process and their roles (project manager, system analyst, developer).

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