how to find out the reverse number of a digit if it is
input through the keyboard?
Answer Posted / amrit
int main()
{
int a = 5678;
int temp=0,rev;
while((a%10)!=0)
{
rev =a%10;
a=a/10;
temp= temp*10+ rev;
}
return 0;
}
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is the difference between local variable and global variable in c?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
Why c is called a middle level language?
Explain the difference between ++u and u++?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
Explain the difference between malloc() and calloc() in c?
If null and 0 are equivalent as null pointer constants, which should I use?
What are the features of c language?
How can I convert a number to a string?
What are pointers? What are different types of pointers?
What is a pointer and how it is initialized?
What is else if ladder?
how do you execute a c program in unix.
When should structures be passed by values or by references?
Can we increase size of array in c?