You don't ask an actual question, you're just repeating your assignment.
But let's see,
the compare function logic is off because you always return after the first iteration. Basically, you're only comparing the first and last characters. If you're trying to check if it's a palindrome, you can only return true/1 if every character meets the requirements.
sossanh
I guess this is translation, but your compare function currently only wants a char, and not a char array. change the signature of the function to int compare(char String[])
You also never declare char_num as a variable, and you currently have it in more than one scope.
But I want you help me in second question
"If a string is not a palindrome, at least how many cuts do you need to cut the string into palindromes ?"
Thankyou