simple c program for 12345 convert 54321 with out using string
Answer Posted / mohit
#include<stdio.h>
#include<conio.h>
main()
{
long int num,x=0;
int b;
while(n>0)
{
b=num%10;
num=num/10;
x=x*10+b;
}
printf("new number=%ld",x);
getch();
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How do I copy files?
Is main is a keyword in c?
What does 2n 4c mean?
How many keywords are there in c?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
What language is c written?
Where are c variables stored in memory?
What is s in c?
What are derived data types in c?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
How do you override a defined macro?
How is a null pointer different from a dangling pointer?
Explain #pragma statements.
What is 1d array in c?