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
Explain what is wrong in this statement?
What is huge pointer in c?
If null and 0 are equivalent as null pointer constants, which should I use?
What is the difference between struct and typedef struct in c?
What the advantages of using Unions?
What is the value of uninitialized variable in c?
What is an auto variable in c?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
How pointer is different from array?
What are the application of void data type in c?
How can I determine whether a machines byte order is big-endian or little-endian?
what does static variable mean?
Is linux written in c?
What is double pointer in c?
What language is c written?