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
What is sizeof c?
How can I write a function that takes a format string and a variable number of arguments?
What is the use of bitwise operator?
Is calloc better than malloc?
Can we assign string to char pointer?
Can a file other than a .h file be included with #include?
What is main return c?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is calloc malloc realloc in c?
What is the use of volatile?
What is actual argument?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
Where in memory are my variables stored?
What are high level languages like C and FORTRAN also known as?
Why cant I open a file by its explicit path?