+ 1
Write a c program to check whthere a word Is in palindrome or not
do while loop only
4 Réponses
+ 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
...
}
+ 1
It is not because there is no C course that speaking about C should be avoided, it is programming related :)
0
C++ or C# there is no C course on this app?
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.