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 polymorphism explain its types?
WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)
why c++ is a highlevel language
3 Answers Satyam, Tech Mahindra,
what is virtual destructor
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
Difference ways of Polymorphism?
What is the difference between declaration and definition?
What is polymorphism what is it for and how is it used?
Why we are use # in begning of programme of c++.
WAP find square root of any number (without using sqrt() )?
Write a program to accept a number and to print numbers in pyramid format? for eg:for a no. 5 1 212 32123 4321234 543212345
Can we create object of class with private constructor?