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?

Answers were Sorted based on User's Feedback



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

Answer / rockin pro

Answer
# 9 #include <stdio.h>
int main(void) {
int num[4], i;
printf("Enter the number :
");
printf("The reverse number is :
");
for(i = 4;i >= 0; i--) {
printf("%d",i);
printf("
");
}
return 0;
}

Thanks for Marking this A

Is This Answer Correct ?    0 Yes 1 No

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

Answer / k.ashok kumar

BETTER CODE:


#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&a);
printf("\n Reverse number of %d is : ",a);
while(a)
{
printf("%d",a%10);
a/=10;
}
getch();
}

Is This Answer Correct ?    6 Yes 8 No

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

Answer / vinit kumar rai

#include<stdio.h>
#include<conio.h>
void main()
{
long int num,i;
int d;
clrscr();
printf("\n enter number");
scanf("%ld",&n);
printf("\n the reverse of number %ld is ",num);
for(i=0;i>0;i=i\10)
{
d=i%10;
printf("%d",d);
}
getch();
}

Is This Answer Correct ?    10 Yes 13 No

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

Answer / vikas kumar from agra

#include<stdio.h>
#include<conio.h>
void main()
{
long int num,i;
int d;
clrscr();
printf("\n enter number");
scanf("%ld",&n);
printf("\n the reverse of number %ld is ",num);
for(i=0;i>0;i=i\10)
{
d=i%10;
printf("%d",d);
}
getch();
}

Is This Answer Correct ?    39 Yes 83 No

Post New Answer

More C Interview Questions

a c code by using memory allocation for add ,multiply of sprase matrixes

0 Answers  


What is p in text message?

0 Answers  


about c language

0 Answers  


What are preprocessor directives in c?

0 Answers  


What is null character in c?

1 Answers  


What are near, far and huge pointers?

0 Answers   Hexaware, Thomson Reuters, Virtusa,


In C language, a variable name cannot contain?

0 Answers  


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


What does it mean when the linker says that _end is undefined?

0 Answers  


What's the best way to declare and define global variables?

7 Answers  


What is the use of a ‘’ character?

0 Answers  


What are examples of structures?

0 Answers  


Categories