Write a c program to read a positive number and display it
in words.?
ex: 123=one two three
help me....
Answer Posted / melwin
The input which is in integer form separate each number by / and % operator store it in array a[i],then using switch case function assign each case from 0 to 1 assigning each case with string, for eg case 1 shld have String "ONE" like wise till case 9, copy that function and store it an a variable using string copy function.then print the string,increment the value of array from i to i+1 and again repeat the switch case.and print the consecutive values.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Are global variables static in c?
Explain high-order and low-order bytes.
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
Does sprintf put null character?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What does the message "automatic aggregate intialization is an ansi feature" mean?
How can I read a binary data file properly?
What is the size of a union variable?
What language is windows 1.0 written?
What is an lvalue?
int i=10; printf("%d %d %d", i, i=20, i);
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
application attempts to perform an operation?
What is the explanation for modular programming?
What are predefined functions in c?