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 are pointers?
What is #define used for in c?
Explain what will the preprocessor do for a program?
How do we print only part of a string in c?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
Explain void pointer?
What is multidimensional arrays
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
Are global variables static in c?
What is register variable in c language?
What does & mean in scanf?
What are the 4 types of functions?
What is volatile c?
Explain the difference between malloc() and calloc() in c?
What are the 5 organizational structures?