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 |
Polymorphism with an example?
what is the new version of oops
Differences between inline functions and non-inline functions?
What is the real life example of polymorphism?
Difference between over loading and over ridding?
12 Answers CTS, Patni, Softvision Solution,
what is the difference between containership and inheritence?
can you give the dynamic polymorphism types?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is polymorphism what are the different types of polymorphism?
Can java compiler skips any statement during compilation time?
what is a binary overloading
What is encapsulation with real life example?