Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ 1.) Write a function that is given a phrase and returns the first word in that phrase. For example, given the quick brown fox,

C++

1.) Write a function that is given a phrase and returns the first word in that phrase. For example, given the quick brown fox, your function should return the.

Here is an example call to the function

cout << firstword(the quick brown fox);

Function Signature

string firstword(string s):

Note: You do not need to submit any other code including the main method or any print statements. ONLY the firstword function is required (leave in your includes and namespace directives). The above example should be used to test your code but deleted or commented out upon submission.

_______________________________________________________________________________________________________________________________

C++

2.) Write a function that is given a phrase and returns the phrase we get if we take out the first word from the input phrase. For example, given the quick brown fox, your function should return quick brown fox

Here is an example call to the function

Cout << remainingwords(the quick brown fox);

Function Signature

string remainingwords(string s);

Note: You do not need to submit any other code including the main method or any print statements. ONLY the remainingwords function is required(leave in your includes and namespace directives). The above example should be used to test your code but deleted or commented out upon submission.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

How are passive investments classified for accounting purposes?

Answered: 1 week ago

Question

discribe the function of the DHCP service on the TCP / IP network

Answered: 1 week ago