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
Why does everyone say not to use gets?
What does %d do in c?
how to find anagram without using string functions using only loops in c programming
why do some people write if(0 == x) instead of if(x == 0)?
Tell me what are bitwise shift operators?
Compare and contrast compilers from interpreters.
What language is c written?
Why can’t we compare structures?
Explain what is the difference between a string and an array?
Explain the difference between getch() and getche() in c?
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 ].
What is the c language function prototype?
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?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What standard functions are available to manipulate strings?