simple c program for 12345 convert 54321 with out using string
Answer Posted / abhradeep chatterjee
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
printf("enter a number");
scanf("%d",&i);
for(int n=1;n<=5;n++)
{
j=i%10;
i=i/10;
printf("%d",j);
}
getch();
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
How to implement a packet in C
List the difference between a 'copy constructor' and a 'assignment operator' in C?
How can I read and write comma-delimited text?
What are the advantages and disadvantages of c language?
What is main function in c?
What is "Duff's Device"?
Explain what is a 'locale'?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
If you know then define #pragma?
What is an array in c?
What is anagram in c?
What are the advantages of using Unions?
What is volatile c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above