Loading...
Is this your company?
implement a function that determines a string is whether a palindrome or not
Anonymous
I wrote a recursive function that gets a string, starting point and ending point.
#include #include main() { char str[]="abcbba"; int len=0; len=strlen(str); for(int i=0;i<=len/2;i++) { if(str[i] != str[(len-i)-1]) { printf("The string is not a palindrome\n"); return; } } printf("The string is a palindrome\n"); }
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalised job recommendations and updates by starting your searches.