WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

Answer Posted / bhavesh kashikar

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a;
float rem=0,rev=0;
while(rev>=0)
{
rem=a%10;
rev=rev*10+rem;
a=a/10;
}
printf(Reverse of two digit no is:=%d",rev);
getch();
}

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does everyone say not to use gets?

580


What does %d do in c?

525


how to find anagram without using string functions using only loops in c programming

2690


why do some people write if(0 == x) instead of if(x == 0)?

629


Tell me what are bitwise shift operators?

631






Compare and contrast compilers from interpreters.

653


What language is c written?

556


Why can’t we compare structures?

789


Explain what is the difference between a string and an array?

603


Explain the difference between getch() and getche() in c?

543


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

612


What is the c language function prototype?

616


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

553


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1677


What standard functions are available to manipulate strings?

541