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 happens if you free a pointer twice?
plz let me know how to become a telecom protocol tester. thank you.
What is wrong with this statement? Myname = 'robin';
What is realloc in c?
Describe newline escape sequence with a sample program?
What are the complete rules for header file searching?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
How do you do dynamic memory allocation in C applications?
Explain what are the different data types in c?
What is wrong with this program statement?
What are static variables in c?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
Explain the advantages and disadvantages of macros.
how to execute a program using if else condition and the output should enter number and the number is odd only...