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

It is simple.use this and it works

#include <stdio.h>
#include <conio.h>

int main()
{
int rem,num;
clrscr();
printf("Enter the number\n");
scanf("%d",&num);
for (num= num; num > 0; num = num/10)
{

rem = num % 10;
printf("%d",rem);

}
return 0;
}

Is This Answer Correct ?    14 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you please explain the difference between malloc() and calloc() function?

1060


Explain how can I read and write comma-delimited text?

1123


What is a program?

1197


Is null always defined as 0(zero)?

1056


Why is c so popular?

1124


What is pointer to pointer in c language?

1071


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

1102


What is the heap?

1168


How can I handle floating-point exceptions gracefully?

1119


Where static variables are stored in memory in c?

958


What are types of functions?

981


What is a static variable in c?

1074


What is the purpose of the preprocessor directive error?

1213


What is the use of putchar function?

1026


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1712