Write a program to find out the number of palindromes in a
sentence.
Answer / ravi
void main()
{
long int n;
printf("ENTER A NUMBER: ");
scanf("%ld",&n);
long int n1,mod;
n1=n;
long int rev=0;
while(n>0)
{
mod = n%10;
rev = rev * 10 + mod;
n = n / 10;
}
if (n1 == rev)
printf("%ld is a palindrome\n",n1);
else
printf("%ld is not a palindrome\n",n1);
}
| Is This Answer Correct ? | 7 Yes | 10 No |
What is virtual constructors/destructors?
What does the keyword "static" mean?
whats the difference between c and c++
write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation
1 Answers College School Exams Tests, HCL, IBM, TCS,
i have to create a view in SQL as like in ORACLE DATA EXPRESS EDITION
Which type does string inherit from?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
what is difference between c++ language and java language
What is difference between new and malloc?
What's the full form of STL?
The type of variable a pointer points to must be the part of pointer's definition so that:
what is a class