Sorry if I am not too good at this, we just started learning about strings a couple of days ago and our book is quite hard to digest. The entered string is supposed to be a standard sentence from the keyboard such as "Hello world" or "I like pancakes", no special characters and no numbers. I have looked at alot of info online, and most point to doing some kind of for loop but being a beginner with strings I am not sure how to take the hint they gave (copy the string and then start from the back of the string) and implement it into a for loop to reverse the order. I am quite the beginner, so any specific guidance would be great. Thank you all, this is a great forum for people like me
If you think about, (well, if I think about it), it's pretty easy.
A string you get is so long. Create a new variable the same length.
The first character of the input string goes in the last spot of the new variable
then, advance one character in your input and subtract one character from your new var, until you have copied strlen(input) characters.
Dino
Mainframe assembler programmer by trade. C coder when I can.