ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
Write a program in c to input a 5 digit number and print it
in words.
 Question Submitted By :: Niharika_dash
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Write a program in c to input a 5 digit number and print it in words.
Answer
# 1
#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 ?    14 Yes 15 No
Vignesh1988i
[Nil]
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma Wipro13
What is the purpose of Scanf Print, getchar, putchar, function?  2
what is available in C language but not in C++?  1
how many times of error occur in C  7
How can I invoke another program from within a C program?  6
write program on arrays GE2
Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);  1
Write a program in c to input a 5 digit number and print it in words.  1
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case TCS7
Explain following declaration int *P(void); and int (*p)(char *a);  2
what are the various memory handling mechanisms in C ? HP3
To what value do nonglobal variables default? 1) auto 2) register 3) static  4
which of the function operator cannot be over loaded a) <= b)?: c)== d)* HCL7
what is use of loop? Infosys6
is compiler do read the data line by line or not. ?? LG-Soft3
Why doesn't the code "int a = 1000, b = 1000; long int c = a * b;" work?  6
simple c program for 12345 convert 54321 with out using string  5
what is the maximum limit of row and column of a matrix in c programming. in linux .  1
how to print a statement in c without use of console statement ,with the help of if statement it should print Satyam2
How to convert a binary number to Hexa decimal number?? (Note:Do not convert it into binary and to Hexadecimal) Subex1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com