convert 12345 to 54321 withoutusing strig

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 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1353


How can you find out how much memory is available?

701


Is it possible to have a function as a parameter in another function?

710


What is the easiest sorting method to use?

720


How do you redirect a standard stream?

732






What are the 5 types of inheritance in c ++?

675


Explain #pragma statements.

691


What is typedef struct in c?

687


Explain how can you determine the size of an allocated portion of memory?

717


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

932


What is the use of sizeof?

651


What is boolean in c?

709


Is multithreading possible in c?

650


can we have joblib in a proc ?

1758


How do I use strcmp?

737