program that accepts amount in figures and print that in
words
Answer Posted / 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 |
Post New Answer View All Answers
What is double pointer?
What is the general form of a C program?
How #define works?
Why is c used in embedded systems?
Explain the difference between malloc() and calloc() in c?
Is c dynamically typed?
When is a null pointer used?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Differentiate between ordinary variable and pointer in c.
What is file in c preprocessor?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
Explain About fork()?
What is c definition?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Is there any data type in c with variable size?