[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
how do i do this? it keep showing "not palindrome"
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /wsr/ - Worksafe Requests

Thread replies: 9
Thread images: 1
File: Capture1.png (10 KB, 321x271) Image search: [Google]
Capture1.png
10 KB, 321x271
how do i do this?
it keep showing "not palindrome" even thought i insert "ada"
>>
nvm. solved it
>>
this looks like my cs homework in 7th grade
>>
nice one
it compares the addresses not the strings
use strcmp or cpp strings
>>
>>15534
You could stop being fucking fancy with the string reverse and just run a for loop based on the length of the string and check if first position and last position are equal etc
>>
>>15628
You could, but that wouldn't work with Unicode.
>>
>>15633
strrev can? I doubt
>>
>>15642
http://rosettacode.org/wiki/Reverse_a_string#C has the same API.
>>
>>15649
so based on your locale encoding it might mangle your char array
this is some nasty behavior
Thread replies: 9
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.