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


Please Help Members By Posting Answers For Below Questions

What is echo in c programming?

565


What is wrong with this program statement? void = 10;

828


How do we make a global variable accessible across files? Explain the extern keyword?

1428


What is the process to generate random numbers in c programming language?

618


What is restrict keyword in c?

649






What is meant by gets in c?

613


What is meant by operator precedence?

684


Explain how can I remove the trailing spaces from a string?

632


Is it better to bitshift a value than to multiply by 2?

664


What is the difference between malloc() and calloc() function in c language?

610


What is declaration and definition in c?

533


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

658


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

1914


Explain how do I determine whether a character is numeric, alphabetic, and so on?

660


Explain what is the difference between a string and an array?

642