diff --git a/LabRecord/8. check if a string is a palindrome or not.c b/LabRecord/8. check if a string is a palindrome or not.c new file mode 100644 index 0000000..685436a --- /dev/null +++ b/LabRecord/8. check if a string is a palindrome or not.c @@ -0,0 +1,21 @@ +#include +#include +int main(){ + char name[100] = "malayalam"; + int i , j,length=0,flag = 1; + while(name[length]!='\0'){ // process of strlen() , you can also do strlen(name); + length++; + } + for(i=0,j=length-1; i