Find string palindrome 10marks
Answer Posted / vivek
bool
IsPalindrome( char *lpStr )
{
int n,i;
n = strlen( lpStr );
for ( i = 0; i < n/2; i++ )
{
if ( lpStr[i] != lpStr[n-i-1] )
{
return FALSE;
}
}
return TRUE;
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
main() { printf("hello"); fork(); }
Where does the name "C" come from, anyway?
What's the right way to use errno?
How main function is called in c?
What is the difference between single charater constant and string constant?
What is a example of a variable?
Why shouldn’t I start variable names with underscores?
How can my program discover the complete pathname to the executable from which it was invoked?
What is the difference between text and binary modes?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
How to declare a variable?
What does c value mean?
How can you draw circles in C?
What is a substring in c?
What is storage class?