+ 1

Write a c program to check whthere a word Is in palindrome or not

do while loop only

4th Sep 2017, 8:49 AM
Archit
Archit - avatar
4 odpowiedzi
+ 3
#include <string.h> ... char s[512]; int i, size; ... size = strlen(s); i = -1; do ++i; while(i <= size/2 && s[i] == s[size - i - 1]); if(i <= size/2){ //not palindrome ... }else{ //palindrom ... }
4th Sep 2017, 9:04 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
It is not because there is no C course that speaking about C should be avoided, it is programming related :)
4th Sep 2017, 10:59 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
0
C++ or C# there is no C course on this app?
4th Sep 2017, 10:54 AM
josh mizzi
josh mizzi - avatar
0
I do not mean to imply that discussion of the C language is inappropriate, only that it may not actually be what the writer ment.
4th Sep 2017, 11:02 AM
josh mizzi
josh mizzi - avatar