write program for palindrome
Answers were Sorted based on User's Feedback
Answer / felix
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
Is This Answer Correct ? | 242 Yes | 354 No |
What is const in c++?
Can a Structure contain a Pointer to itself?
True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends
What is the difference between "calloc" and "malloc"?
What is long in c++?
What is a mutex and a critical section.Whats difference between them?How do each of them work?
when can we use copy constructor?
If a header file is included twice by mistake in the program, will it give any error?
What are the main characteristics of C++ as a programming language?
Is java a c++?
class A { public: void f(); protected: A() {} A(const A&){} }; Examine the class declaration shown above. Why are the default and copy constructors declared as protected? 1. To ensure that A cannot be created via new by a more derived class 2. To ensure that A cannot be copied 3. To ensure that A cannot be used as a base class except when public inheritance has been used 4. To ensure that A cannot be created/copied outside the inheritance chain 5. To ensure that A cannot be instantiated as a static variable
Why do we use the using declaration?