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 a good way to implement complex numbers in c?
What are pointers really good for, anyway?
How do you print an address?
What does sizeof function do?
What are qualifiers in c?
How do we make a global variable accessible across files? Explain the extern keyword?
What is the purpose of realloc()?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
What is the return type of sizeof?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
Why doesn't C support function overloading?
Describe wild pointers in c?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
When should the const modifier be used?