Computer Science, asked by Anonymous, 5 months ago

4.Write a Program any programming language like C++ to parse an INPUT message and produce the OUTPUT string.

Answers

Answered by jolaparavishwa304
0

Answer:

hoping it will help uu..

Explanation:

using namespace std;

  

int main()

{

      

    string line = "GeeksForGeeks is a must try";

      

    // Vector of string to save tokens

    vector <string> tokens;

      

    // stringstream class check1

    stringstream check1(line);

      

    string intermediate;

      

    // Tokenizing w.r.t. space ' '

    while(getline(check1, intermediate, ' '))

    {

        tokens.push_back(intermediate);

    }

      

    // Printing the token vector

    for(int i = 0; i < tokens.size(); i++)

        cout << tokens[i] << '\n';

}

Similar questions