convert 12345 to 54321 withoutusing strig

Answer Posted / ismail

void main()
{
long num, temp;
for(;;) {
printf("Enter number:");
scanf("%ld",&num);
if(num == 0) break;
while(num) {
temp = num%10;
num = num/10;
printf("%ld", temp);
}
printf("\n");
break;
}
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is int a keyword in c?

643


what is uses of .net

1359


What is a #include preprocessor?

706


program for reversing a selected line word by word when multiple lines are given without using strrev

2049


Why isn't any of this standardized in c? Any real program has to do some of these things.

756






What is the difference between Printf(..) and sprint(...) ?

891


How do I convert a string to all upper or lower case?

733


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

778


What are header files and what are its uses in C programming?

712


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2125


What is meant by int main ()?

817


What is sizeof in c?

663


What is the difference between array_name and &array_name?

863


How do I use strcmp?

737


Why c language is called c?

655