Write a program in c to input a 5 digit number and print it
in words.
Answer Posted / swathi
# include <stdio.h>
int main ()
{
int n;
char a[10][10] = {"zero", "one", "two", "three", "four",
"five", "six", "seven", "eight", "nine"};
printf ("Enter the number:\n");
scanf ("%d", &n);
printf ("The given num in word = %s\n", a[n]);
}
Is This Answer Correct ? | 26 Yes | 36 No |
Post New Answer View All Answers
What is echo in c programming?
What is wrong with this program statement? void = 10;
How do we make a global variable accessible across files? Explain the extern keyword?
What is the process to generate random numbers in c programming language?
What is restrict keyword in c?
What is meant by gets in c?
What is meant by operator precedence?
Explain how can I remove the trailing spaces from a string?
Is it better to bitshift a value than to multiply by 2?
What is the difference between malloc() and calloc() function in c language?
What is declaration and definition in c?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Explain what is the difference between a string and an array?