Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (anonymous):

how to make a palindrome using c++

OpenStudy (anonymous):

this is in c language #include<stdio.h> #include<conio.h> #include<string.h> main() { char a[100], b[100]; printf("Enter the string to check if it is a palindrome\n"); gets(a); strcpy(b,a); strrev(b); if( strcmp(a,b) == 0 ) printf("Entered string is a palindrome.\n"); else printf("Entered string is not a pailndrome.\n"); getch(); return 0; }

OpenStudy (anonymous):

what is the function of strcmp, strrev..?

OpenStudy (arnavguddu):

strcmp (char* str1, char *str2) ---- compares the two string str1, str2 if str1 and str2 are equal, it returns 0, otherwise the difference between the last unequal character of the str1, str2 ===== like *str2 - *str1 strrev(char* str) ---- reverses the presented string (in place) and returns the reversed string

OpenStudy (anonymous):

thanks..but is your programme using c++?

OpenStudy (arnavguddu):

the prog is by shopaps....not me... but it seems to be in C but will work in both C and C++ without modification

OpenStudy (anonymous):

owh ok thanks..^^

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!