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
What does c mean?
What is the use of getchar functions?
Why clrscr is used in c?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
Calculate 1*2*3*____*n using recursive function??
When should we use pointers in a c program?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
Which are low level languages?
Do you have any idea how to compare array with pointer in c?
What is the hardest programming language?
What are the different types of data structures in c?
What is the difference between text and binary modes?
what are bit fields? What is the use of bit fields in a structure declaration?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Where in memory are my variables stored?