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 |
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,
Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)
what is single inheritance?
what is data abstraction with example.
why overriding?
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?
How can i write a code in c# to take a number from the user and then find all the prime numbers till the number entered by the user.
Plese get me a perfect C++ program for railway/airway reservation with all details.
How to hide the base class functionality in Inheritance?
What is class and example?
What is the difference between declaration and definition?
pointers are support in C#? if yes then how to use it?
8 Answers Softvision Solution,