1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alisha [4.7K]
3 years ago
6

Write the definition of a function named rcopy that reads all the strings remaining to be read in standard input and displays th

em, one on a line with no other spacing, onto standard output IN REVERSE ORDER. So if the input was: here comes the sun the output would be sun the comes here The function must not use a loop of any kind (for, while, do-while) to accomplish its job.

Computers and Technology
1 answer:
pickupchik [31]3 years ago
5 0

Answer:

//Include this header file if program is executing on //visual studio.

#include "stdafx.h";

//Include the required header file.

#include <iostream>

#include <string>

//Use the standard namespace.

using namespace std;

//Define the function rcopy.

void rcopy()

{

    //Declare a string variable to store the string.

    string s;

    //Prompt the user to input the string.

    cin >> s;

    //Check if the string entered by the user reach to

    //the next line character.

    if (cin.get() == '\n')

    {

         //Display the last word in the string.

         cout << s << " ";

         //Return from the if statement.

         return;

    }

    //Make a recursive call to the function rcopy.

    rcopy();

    //Display the remaining words in the string in

    //the reverse order.

    cout << s << " ";

}

//Start the execution of the main method.

int main()

{

    //Call the function rcopy.

    rcopy();

    //Use this system command to hold the console screen      //in visual studio.

    system("pause");

    //Return an integer value to the main function.

    return 0;

}

Explanation:

See attached images for the code and output

You might be interested in
What is a BINARY, bits and bytes ​
Stels [109]
A bit (short for binary digit) is the smallest unit of data in a computer. A bit has a single binary value, either 0 or 1. ... Half a byte (four bits) is called a nibble. In some systems, the term octet is used for an eight-bit unit instead of byte.
4 0
4 years ago
¿como influye la tecnologia en su vida cotidiana?
ANEK [815]

Answer:

La tecnología afecta la forma en que hablamos, aprendemos y pensamos. También nos hemos vuelto dependientes de la tecnología.

Explanation:

3 0
3 years ago
If you receive an increase in pay, how will that affect your payroll deductions?
spin [16.1K]
No it will actually help it
3 0
4 years ago
What do artists often use to create illusions in an Image?
gladu [14]

Answer:

I don't know Sorry so sorry

4 0
3 years ago
Read 2 more answers
Which sentence in the passage shows an effective way to protect your document from misuse? Claire has saved her research paper o
goblinko [34]

Answer: She sets an access password while saving the file. hope this helps!!!!

Explanation:

4 0
3 years ago
Other questions:
  • What is something you can do to stay connected to the relationships in your life while we spend this time at home?
    13·1 answer
  • Dani wants to create a web page to document her travel adventures. Which coding language should she use? HTML Java Python Text
    15·1 answer
  • One of the disadvantages of Audacity is that it has limited technical support since it is a free program.     true or false
    11·2 answers
  • Ip addresses and their corresponding domain names are used to identify computers available through the internet.
    15·1 answer
  • Write a program to find and print the sum of the first n cubes in the following four ways.
    12·1 answer
  • When choosing a new computer to buy, you need to be aware of what operating it uses.
    12·1 answer
  • A company is deploying a file-sharing protocol across a network and needs to select a protocol for authenticating clients. Manag
    13·1 answer
  • PLS HELP ME!! WILL GIVE BRAINLIEST
    7·2 answers
  • When you type in text in an image in a photo-editing software, where is it created?
    8·1 answer
  • These are pictorial images displayed on a computer screen​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!