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
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What is difference between constant pointer and constant variable?
What is oops c?
Explain how can a program be made to print the name of a source file where an error occurs?
What is a list in c?
What is the meaning of ?
How many bytes are occupied by near, far and huge pointers (dos)?
Explain why c is faster than c++?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
Why do we use return in c?
What is a floating point in c?
How can I swap two values without using a temporary?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
How can I open files mentioned on the command line, and parse option flags?
How can you increase the size of a dynamically allocated array?