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
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
Explain what header files do I need in order to define the standard library functions I use?
Explain how can I read and write comma-delimited text?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
Explain can static variables be declared in a header file?
What is break statement?
i got 75% in all semester am i eligible for your company
Are there namespaces in c?
Explain what is the difference between #include and #include 'file' ?
What is the return type of sizeof?
What is a header file?
4. main() { int c=- -2; printf("c=%d",c); }
What is a MAC Address?
What is the use of ?: Operator?