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 the explanation for prototype function in c?

560


Is this program statement valid? INT = 10.50;

679


Why is it important to memset a variable, immediately after allocating memory to it ?

1546


Explain pointer. What are function pointers in C?

620


What is the difference between array and linked list in c?

592






application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

593


What is the heap in c?

635


Do you have any idea how to compare array with pointer in c?

592


What are different types of variables in c?

563


What are file streams?

558


Explain why c is faster than c++?

564


How can I open a file so that other programs can update it at the same time?

652


in linking some of os executables are linking name some of them

1645


What are linker error?

606


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

4534