int main(){
char texto[1000];
do{
scanf("%[^\n]", texto);
if(!fakeEquals(texto)){
if(palindromo(texto)){
printf("SIM\n");
}else{
printf("NAO\n");
}
}
}while(!fakeEquals(texto));
return 0;
Is a program that returns whether a String is palindrome or not, when scan ("% s", text) was used; was working, but as I need to read spaces too, I switched to scanf ("% [^ \ n]", text); but when I type any word it keeps returning to me YES or NOT infinitely ...