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 is exit() function?
What is hashing in c language?
Does c have class?
Explain how do you sort filenames in a directory?
What is wrong with this program statement? void = 10;
How can I do peek and poke in c?
What is pragma c?
Write a simple code fragment that will check if a number is positive or negative.
What is pragma in c?
How can this be legal c?
What are # preprocessor operator in c?
Write a program with dynamically allocation of variable.
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
what value is returned to operating system after program execution?
What are the types of data files?