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 |
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
what is the difference between <stdio.h>and "stdio.h"?
what is the use of template classes in c++
what is static?
design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }
what is the difference between class and structure in C++?
Which is better struts or spring?
What is a class and object?
what is virtual function in c++
What is the difference between class and object?
Can you explain polymorphism?
what is the difference between containership and inheritence?