Question: Write a void function called OnlyUppercase IN C++ that has only two parameters, a reference to a istringstream and a reference to an ostring stream.

Write a void function called "OnlyUppercase" IN C++ that has only two parameters, a reference to a istringstream and a reference to an ostring stream. This function should read whitespace separated words from the first argument and write those words (each with a trailing newline character) to the second argument. However, only the words that are composed solely of UPPERCASE letters should be written to the second argument

Example input and output:

.Write a void function called "OnlyUppercase" IN C++ that has only two

INPUT OF THE TEST CASE #include but NOT! This"); std::istringstream iss("WORD AND ANOTHER std::ostringstream oss; OnlyUppercase (iss, oss); ASSERT_EQ(oss.str(), "WORD AND ANOTHER "); - 0 std::istringstream iss_2(" Many Words THAT ONLY SOME SHOULD Be -ADDED"); std::ostringstream oss_2; OnlyUppercase (iss_2, oss_2); ASSERT_EQ (oss_2.str(), "THAT SHOULD "); 10 11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!