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


Please Help Members By Posting Answers For Below Questions

How are Structure passing and returning implemented by the complier?

809


Where we use clrscr in c?

797


How do you print an address?

850


What are the Advantages of using macro

770


What does return 1 means in c?

666






Explain what does a function declared as pascal do differently?

755


When should the const modifier be used?

747


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

992


Which is better between malloc and calloc?

773


What is the use of bit field?

736


When the macros gets expanded?

922


Write program to remove duplicate in an array?

678


Why c is called top down?

718


What are the advantages and disadvantages of a heap?

788


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

736