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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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 c program to accept a given integer value and print 
its value in words
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: write a c program to accept a given integer value and print its value in words
Answer
# 1
#include<stdio.h>
int main()
{
int n;
clrscr();
printf("\nenter a integer number::");
scanf("%d",&n);
switch(n)
{
case:1
printf("\nOne");
break;
case:2
printf("\nTwo");
break;
case:3
printf("\nThree");
break;
case:4
printf("\nFour");
brak;
case:5
printf("\nFive");
break;
case:6
printf("\nSix");
break;
case:7
printf("\nSeven");
break;
case:8
printf("\nEight");
break;
case:9
printf("\nNine");
break;
default:
printf("\nSorry");
}
getch();
}
 
Is This Answer Correct ?    4 Yes 14 No
Uday
 
  Re: write a c program to accept a given integer value and print its value in words
Answer
# 2
#include<stdio.h>
int main()
{
int n;
clrscr();
printf("\nenter a integer number::");
scanf("%d",&n);
switch(n)
{
case:1
printf("\nOne");
break;
case:2
printf("\nTwo");
break;
case:3
printf("\nThree");
break;
case:4
printf("\nFour");
brak;
case:5
printf("\nFive");
break;
case:6
printf("\nSix");
break;
case:7
printf("\nSeven");
break;
case:8
printf("\nEight");
break;
case:9
printf("\nNine");
break;
default:
printf("\nSorry");
}
getch();
}
 
Is This Answer Correct ?    3 Yes 12 No
Sheikh Rasel
 
 
 
  Re: write a c program to accept a given integer value and print its value in words
Answer
# 3
#include<stdio.h>
#include<conio.h>
void main()
{
long int n;
int a[15];
printf("enter the number:");
scanf("%ld",&n);
for(int i=0;n>0;i++)
{
a[i]=n%10;
n=n/10;
}
for(int j=i;j>0;j--)
{
switch(a[j])
{
case 1:
printf("one ");
break;
case 2:
printf("two ");
break;
case 3:
printf("three ");
break;
case 4:
printf("four ");
break;
case 5:
printf("five ");
break;
case 6:
printf("six ");
break;
case 7:
printf("seven ");
break;
case 8:
printf("eight ");
break;
case 9:
printf("nine ");
break;
case 0:
printf("zero ");
break;
default:
printf("no number exists like this :");
}
}
getch();
}
 
Is This Answer Correct ?    2 Yes 4 No
Vignesh1988i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
2)#include<iostream.h> main() { printf("Hello World"); } the program prints Hello World without changing main() the o/p should be intialisation Hello World Desruct the changes should be a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<<Destruct b) c) d)none of the above Siemens4
what is diff between localstatic and globalstatis variable possible 2 use in another file...? HCL2
To find whether a number is even or odd without using any conditional operator?? IBM4
To what value are pointers initialized? 1) NULL 2) Newly allocated memory 3) No action is taken by the compiler to initialize pointers.  2
Tell us the difference between these two : #include"stdio.h" #include<stdio.h> define in detial.  4
How to receive strings with spaces in scanf()  4
write a string copy function routine?  1
what is self refrential structure HCL2
Why doesn't the code "int a = 1000, b = 1000; long int c = a * b;" work?  6
write a program that explain #define and # undef directive  1
parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..  4
read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50 TCS2
write a program to display the array elements in reverse order in c language  6
we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language????????????? Google2
We can draw a box in cprogram by using only one printf();& without using graphic.h header file? NIIT3
can we write a program in c for printf and scanf without using header file stdio.h  1
how to create c progarm without void main()?  1
what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); } Infosys14
Can we include one C program into another C program if yes how? Infosys4
main() {int a=200*200/100; printf("%d",a); } TCS7
 
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