Write a program in c to input a 5 digit number and print it
in words.
Answers were Sorted based on User's Feedback
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 |
#define d 10+10 main() { printf("%d",d*d); }
write c program to display output 10(10+20)+(10+20+30)+ ... n term
0 Answers Hindustan Gum Chemicals,
to get a line of text and count the number of vowels in it
main() { int i; for(i=0;i<5;i++) printf("%d",1l<<i); } why doesn't 'l' affect the code??????
How does normalization of huge pointer works?
What is NULL pointer?
Explain 'far' and 'near' pointers in c.
Explain the ternary tree?
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.
What is time complexity c?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
macros and function are related in what aspect? a)recursion b)varying no of arguments c)hypochecking d)type declaration
12 Answers HCL, Infosys, Microsoft,