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 / sahibzada nisar ahmad

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,d,e;
printf("Enter Three Digits Number=");
scanf("%d",&a);
b=a/100;
c=a%100;
d=c/10;
e=c%10;
printf("\n\tThe Reverse Number is =%d%d%d=",e,d,b);
getch();
}

Is This Answer Correct ?    6 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain #pragma statements.

612


Can we use any name in place of argv and argc as command line arguments?

619


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

720


Do you know the use of fflush() function?

608


What are the types of i/o functions?

693






What is a stream?

659


can we implement multi-threads in c.

679


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

2463


What does == mean in texting?

681


Which is more efficient, a switch statement or an if else chain?

589


What is the difference between text files and binary files?

686


Explain the advantages and disadvantages of macros.

634


If fflush wont work, what can I use to flush input?

629


Create a simple code fragment that will swap the values of two variables num1 and num2.

832


Why is C language being considered a middle level language?

660