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 the mean of function?
Can we declare a function inside a function in c?
I came across some code that puts a (void) cast before each call to printf. Why?
Can we use visual studio for c?
Explain Function Pointer?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What is typedf?
Explain what is the heap?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Explain the process of converting a Tree into a Binary Tree.
Explain why c is faster than c++?
What is volatile variable in c with example?
What are header files in c?
Can you return null in c?