Print all the palindrome numbers.If a number is not
palindrome make it one by attaching the reverse to it.
eg:123
output:123321 (or) 12321
Answer Posted / ankush kumar mittal
#include<stdio.h>
void main()
{
int rev=0,a,b,c;
scanf("%d",a);
if(a=!0)
{
b=a%10;
a=a/10;
rev=rev*10+b;
}
}
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
Explain what is the benefit of using an enum rather than a #define constant?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Explain what are multidimensional arrays?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
What are the 5 organizational structures?
What is the best style for code layout in c?
Explain what are the __date__ and __time__ preprocessor commands?
What is size of union in c?
What is an identifier?
write a program to create a sparse matrix using dynamic memory allocation.
Is it better to use malloc() or calloc()?
Here is a good puzzle: how do you write a program which produces its own source code as output?
how to write optimum code to divide a 50 digit number with a 25 digit number??
Why doesnt long int work?