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

Do you know null pointer?

596


Why c is a mother language?

548


What does 4d mean in c?

932


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

647


What is the use of #define preprocessor in c?

607






What is static and volatile in c?

773


How do I read the arrow keys? What about function keys?

606


How to set file pointer to beginning c?

655


Why are all header files not declared in every c program?

592


Is c procedural or functional?

580


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

654


Explain how can I convert a number to a string?

636


Is malloc memset faster than calloc?

605


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

1904


what is the diffrenet bettwen HTTP and internet protocol

1383