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 c high or low level?

585


What is nested structure with example?

625


What is the purpose of realloc()?

672


Explain the properties of union. What is the size of a union variable

718


How can I find out how much free space is available on disk?

631






What is static and auto variables in c?

567


What are # preprocessor operator in c?

632


Explain how do you print only part of a string?

650


What is d'n in c?

638


What is function and its example?

628


what is use of malloc and calloc?

1386


What are the 5 elements of structure?

569


write a program to display all prime numbers

1456


Compare array data type to pointer data type

600


What is the benefit of using #define to declare a constant?

609