Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


to find out the reverse digit of a given number

Answers were Sorted based on User's Feedback



to find out the reverse digit of a given number..

Answer / vishnu

#include<stdio.h>
#include<conio.h>
void main()
{
int r,num,sum=0;
clrscr();
printf("Enter any Digit \n");
scanf("%d", &num);
while(num!=0)
{
r=num%10;
sum=sum*10+r;
num=num/10;
}
printf("Reverse Digit of a given number = %d",sum);
getch();
}

Is This Answer Correct ?    66 Yes 26 No

to find out the reverse digit of a given number..

Answer / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int n,a;
printf("enter the number to be reversed :");
scanf("%d",&n);
printf("the reversed number is :");
for(int i=0;n>0;i++)
{
a=n%10;
n=n/10;
printf("%d",a);
}
getch();
}

Is This Answer Correct ?    74 Yes 37 No

to find out the reverse digit of a given number..

Answer / vaibhav

#include<stdio.h>
#include<conio.h>
void main()
{
int no, t;
clrscr();
printf("\nenter the no.");
scanf("%d",&no);
while(no!=0)
{
t=no%10;
no=no/10;
printf("%d",t);
}
getch();
}

Is This Answer Correct ?    23 Yes 9 No

to find out the reverse digit of a given number..

Answer / jet lee

#include<stdio.h>

int rev(int y);
int main()
{
int x;
printf("\n please enter the number:\n");
scanf("%d",&x);
rev(x);
return 0;
}

int rev(int y)
{

int i;
do
{
i=(y%10);
printf("%d",i);
y=(y/10);
}while(y>0);
}

Is This Answer Correct ?    17 Yes 9 No

to find out the reverse digit of a given number..

Answer / srinath, hyd

#include<stdio.h>
#include<conio.h>
void main()
{
int no, t;
clrscr();
printf("\nenter the no.");
scanf("%d",&no);
while(no!=0)
{
t=no%10;
no=no/10;
printf("%d",t);
}
getch();
}

Is This Answer Correct ?    10 Yes 11 No

to find out the reverse digit of a given number..

Answer / sreejesh1987

int rev(int,int);
void main()
{
int a,b;
clrscr();
printf("\nEnter the number to reverse:");//456
scanf("%d",&a);
b=a%10;//b=6
printf("\nReverse of the number is: %d",rev(a,b));
getch();
}

int rev(int a,int b)
{
if(a>9)//456
{
a=a/10;//a=45
b=b*10+a%10;//65
return rev(a,b);
}
else
return b;
}

Is This Answer Correct ?    3 Yes 5 No

Post New Answer

More C Interview Questions

ABCDCBA ABC CBA AB BA A A

4 Answers   TCS,


what is the coding of display the factorial of a number using array and function?

1 Answers  


Is c procedural or object oriented?

0 Answers  


what are bit fields in c?

2 Answers  


What is the newline escape sequence?

0 Answers  


Is it possible to run a c program without using main?If yes HOW??

13 Answers   Wipro,


Differentiate between the expression “++a” and “a++”?

0 Answers  


What are the different types of storage classes in C?

3 Answers  


What is the difference between array_name and &array_name?

0 Answers  


What are global variables?

0 Answers  


What is the advantage of c?

0 Answers  


Why is c called "mother" language?

0 Answers  


Categories