In C programming how can we check that the entered String is palindrome or not..?
This is a discussion on To check the String is palindrome or not.? within the C Programming forums, part of the General Programming Boards category; In C programming how can we check that the entered String is palindrome or not..? http://im.cprogramming.com/images/smilies/confused.png...
In C programming how can we check that the entered String is palindrome or not..?
Basically, just check if the 0th (first) letter is equal to the last,
the 1st (second) equal to the one before last
...
the nth equal to the (last-n)th
...
until you've checked all of them (except maybe a single middle letter for strings with odd length).
firstly tell me how can i entered string..??
Wasn't that lesson #2 (lesson #1 being the famous "Hello, World!" program)?
Did you miss the class, maybe ...
Check the fgets() function. It is a safe way to get strings.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook
thnx...
tell me the logic please...
qny described the logic in post #2.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way