Given Sentence Palindrome or Not
Please send me Accurate C++ code to reverse the sentence and find the given sentence is palidrome or not.
Thanx in advance...
Re: Given Sentence Palindrome or Not
This is a really easy task and if you cannot do it yourself then you should ask why you are on a programming course in the first place.
Here's a major hint. Look at the string "Hello olleH". What do you notice about characters  and [strlen-1]? What do you notice about  and [strlen-2]? And in general [n] and [strlen-1-n]? HINT HINT HINT ***for loop***. You can do it in about 6 lines of code, and you don't need to reverse the string to be able to tell if it's a palindrome.
|All times are GMT +5.5. The time now is 09:13.|