program that accepts amount in figures and print that in
words

Answers were Sorted based on User's Feedback



program that accepts amount in figures and print that in words..

Answer / shilpa

int num, temp,lastnumber[100];

num=12345;
temp=num;
for(int i=1;temp==0;i++)
temp=temp/10; //to check how many digits are there
// even if zero is included in it like 10004
// so number of digits is equal to i;
temp=num;
for(int j=1;i==j;j++)
{
num=num/10; // since num is integer it will exculde the decimal
num=num*10; // exclude number will be replaced by zero
lastnumber[j]=temp-num;
temp=num;
}

Is This Answer Correct ?    5 Yes 3 No

program that accepts amount in figures and print that in words..

Answer / prachi.ktr121

programming

Is This Answer Correct ?    4 Yes 10 No

Post New Answer

More C Interview Questions

Does sprintf put null character?

0 Answers  


What are pragmas and what are they good for?

0 Answers  


How can I access memory located at a certain address?

3 Answers   Verizon,


char ch=10;printf("%d",ch);what is the output

14 Answers   Accenture,


What is the meaning of ?

0 Answers  






What library is sizeof in c?

0 Answers  


what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these

2 Answers   IBM,


What is the data segment that is followed by c?

0 Answers  


hello friends what do u mean by BUS ERROR i got this error while i am doing my program in DATA STRUCTURES

2 Answers   Wipro,


Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.

3 Answers   HCL,


Write a C program that reads a series of strings and prints only those ending in "ed"

2 Answers   Accenture,


What is the difference between malloc() and calloc()?

0 Answers  






Categories