HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT
IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE
Answers were Sorted based on User's Feedback
Answer / prof.gagandeep jagdev
#include<stdio.h>
#include<conio.h>
long int num,result=0,i;
void main()
{
clrscr();
printf("\nenter the number to be reversed=");
scanf("%ld",&num);
while(num>0)
{
i=num%10;
num=num/10;
result=result*10+i;
}
printf("\nReversed number is=%ld",result);
getch();
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / yogita
#include<stdio.h>
void main()
{
int n;
printf("enter any number");
scanf("%d",&n);
while(n>0)
{
a=n%10;
n=n/10;
pritnf("%d",a);
}
getch();
}
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / audumbar
#include<stdio.h>
main()
{
int n;
printf("\n enter the number");
scanf("%d",&n);
while(n!=0)
{
int a=n%10;
printf("%d",a);
n=n/10;
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
What is break in c?
Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?
can we declare a function inside the structure? ex: struct book { int pages; float price; int library(int,float); }b; is the above declaration correct? as it has function declaration?
Describe the difference between = and == symbols in c programming?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
implement general tree using link list
Why we use void main in c?
how to print this pyramid * * * * * * * * * * * * *
what is a NULL pointer?
Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?
Determine the result of performing two successive block transfers into the same area of a frame buffer using the binary arith operations
what is dangling pointer?