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...

write a program to display reverse of a number using for
loop?

Answer Posted / balaji ganesh

#include<stdio.h>
#include<string.h>
void main()
{
char a[50];
int i,n;
clrscr();
printf("\n enter number:");
scanf("%s",a);
printf("reverse number is:");
for(i=strlen(a);i>=0;i--)
{
printf("%c",a[i]);
}
getch();
}

Is This Answer Correct ?    30 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pass by reference in functions?

805


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1051


Explain how can you tell whether a program was compiled using c versus c++?

1071


What are pointers? Why are they used?

1135


What is a c token and types of c tokens?

1024


What is the size of a union variable?

1021


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

951


What is #define size in c?

1143


Do you have any idea about the use of "auto" keyword?

1059


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1062


What are the basic data types associated with c?

1242


Is null equal to 0 in sql?

1105


What are the loops in c?

956


What is the best way to comment out a section of code that contains comments?

1286


What is %d used for?

1000