Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a program in c to input a 5 digit number and print it
in words.

Answers were Sorted based on User's Feedback



Write a program in c to input a 5 digit number and print it in words...

Answer / vignesh1988i

#include<stdioi.h>
void main()
{
int n,count=0,a[20];
scanf("%d",&n);
for(i=0;n>0;i++)
{
a[i]=n%10;
n=n/10;
count++;
}
for(i=0;i<count;i++)
{
switch(a[i])
{
case 1:
printf("one");
break;
case 2:
printf("two");
break;
like this print upto case 0 , (ie) after case 9 ... put
case 0.... and finish the switch and close the loop.......

Is This Answer Correct ?    119 Yes 186 No

Post New Answer

More C Interview Questions

Explain what are bus errors, memory faults, and core dumps?

0 Answers  


What is c language and why we use it?

0 Answers  


WHAT IS LOW LEVEL LANGUAGE?

2 Answers  


What is identifiers in c with examples?

0 Answers  


Write a c program to read a positive number and display it in words.? ex: 123=one two three help me....

2 Answers  


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

0 Answers  


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

0 Answers  


main() { int i = -3,j=2,k=0,m; m= ++i || ++j && ++k; printf("%d%d%d",i,j,k,m); }

7 Answers   HCL,


What is the default value of local and global variables in c?

0 Answers  


How to find a missed value, if you want to store 100 values in a 99 sized array?

0 Answers   Honeywell, Zomato,


#include<conio.h> #include<stdio.h> void main() { int i; if(1,0,2,3) { printf("if"); } else { printf("else"); } getch(); } Can any body tell the answer of this question with explanation?

3 Answers   Huawei,


How are Structure passing and returning implemented by the complier?

0 Answers   TISL,


Categories