logo CodeStepByStep logo

ReverseWordOrder

Language/Type: VB string return

Write a function named ReverseWordOrder that accepts a string s as its parameter and returns a new string with the words from s in reverse order. A word is a sequence of one or more non-space characters words are separated by single spaces. For example, the call of ReverseWordOrder("Hello what is your name?") should return "name? your is what Hello".

This problem is fairly straightforward to solve if you use the function Strings.Split. For added challenge, can you solve it without using Strings.Split?

Function: Write a VB function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.