WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

Answers were Sorted based on User's Feedback



WRITE A PROGRAM TO FIND A REVERSE OF TWO NO..

Answer / ashok

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

Is This Answer Correct ?    21 Yes 10 No

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO..

Answer / 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

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO..

Answer / ajay

#include<stdio.h>
#include<conio.h>
main()
{
int a, b,c,d;
printf("Enter a value:");
scanf("%d", &a);
if (a%10==0)
{b=a/10;
printf("Reverse value is:%0d", b);}
else
{c=a%10;
d=(a/10)+(c*10);
printf("Reverse value is:%d", d);}
getch();
}

Is This Answer Correct ?    9 Yes 1 No

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO..

Answer / .::get lost::.

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

Is This Answer Correct ?    3 Yes 1 No

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO..

Answer / selvakumar

#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,b=0,c;
printf("\nEnter any number : ");
scanf("%d",&n);
c=n;
while(n!=0)
{
a = n%10;
b = (b*10)+a;
n = n/10;
}
if(b==c)
printf("\nPalindrome no");
else
printf("\nNot a palindrome no");
printf("\nReverse of the number is %d",b);
getch();
}

Is This Answer Correct ?    2 Yes 1 No

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO..

Answer / vaibhav

#include <stdio.h>
#include<conio.h>
void main()
{
int n,t;
printf("\n enter the 2 digit no.");
scanf("%d",&n);
while(n%10>0)
{
t=n%10;
n=n/10;
printf("\n reverse no. is%d",t);
}
getch();
}

Is This Answer Correct ?    0 Yes 3 No

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO..

Answer / priya

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\nEnter Two no. ");
scanf("%d%d",&a,&b);
printf("\nBefore Reverse %d%d",a,b);
printf("\nAfter Reverse %d%d",b,a);
getch();
}

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More C Interview Questions

The differences between Windows XP and Windows Visa

8 Answers   HCL,


There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.

0 Answers  


Taking an example,differentiate b/w loader and linker ?

1 Answers  


What does the function toupper() do?

0 Answers  


Why is #define used?

0 Answers  






Give me the code of in-order recursive and non-recursive.

0 Answers   DELL,


what is self refrential structure

3 Answers   HCL,


#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

1 Answers   Vector India,


What is string length in c?

0 Answers  


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

0 Answers   Subex,


What are integer variable, floating-point variable and character variable?

0 Answers  


What are volatile variables?

1 Answers   Mind Tree,


Categories