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 mean by design pattern
IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?
What do you mean by inline function?
What is encapsulation with real life example?
Precompilation ?
Why do we use class in oops?
Why it is called runtime polymorphism?
What are the components of marker interface?
What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the scope resolution operator while accessing them. I want to know some other advantages of unnamed namespaces...
What do you mean by binding of data and functions?
features of OOPS
22 Answers Ness Technologies, Satyam,
what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....