write a program to display reverse of a number using for
loop?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
What are nested functions in c?
please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch
What are the advantages of external class?
1.)how to find d most repeated word in a string? string ="how do you do"?? output should be do
1 Answers AAS, Nagarro, Vuram,
please send me papers for Dy. manager IT , PNB. it would be a great help for me.
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?
Can a pointer be null?
write a program to concatenation the string using switch case?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What are global variables and how do you declare them?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
how to swap two nubers by using a function with pointers?