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
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
What is the total generic pointer type?
What is pass by value in c?
What is wrong with this program statement? void = 10;
Explain what is a pragma?
What are the rules for the identifier?
What is difference between structure and union in c?
Why is c platform dependent?
Explain the Difference between the New and Malloc keyword.
How can I do graphics in c?
How are variables declared in c?
What is the difference between struct and union in C?
What is the sizeof () a pointer?
What are c identifiers?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.