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

int main()
{
int num;
int i;
int a[10];
printf("enter the number \n");
scanf("%d",&num);

for(i =0;num;i++)
{
a[i]=num %10;
num= num/10;
printf("%d",a[i]);
}

getch();
}

Is This Answer Correct ?    29 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the c preprocessor do?

1042


What are the advantages of Macro over function?

1923


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1176


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1093


Is c weakly typed?

962


What is the correct code to have following output in c using nested for loop?

1024


How can I call a function with an argument list built up at run time?

1171


Can include files be nested? How many levels deep can include files be nested?

1083


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

2261


Why do we need functions in c?

952


What is the use of bitwise operator?

1065


can anyone please tell about the nested interrupts?

2063


What are the 5 organizational structures?

970


What was noalias and what ever happened to it?

974


What is the difference between ++a and a++?

1147