Switching two words around in a string
I was wondering if someone could point me in the right direction here.
A pointer to a string is passed into a function, the string contains a few different words and numbers separated by spaces. Anyways, the first two things in the string are two words that need to be switched around and then the string needs to be printed out again with the first two words switched around, everything else the same.
I know this probably sounds simple to some, but I'm having a heck of a time figuring this out.