write a c code "if you give a any decimal number then print that number in english alphabet"?
ex: i/p: 552
o/p: five hundred fifty two ...
#include<stdio.h>
void main()
{
int number,i=0,j,digit;
char * word[1000];
printf("Enter number
");
scanf("%d",&number);
while(number){
digit = number %10;
number = number /10;
switch(digit){
case 0: word[i++] = "zero"; break;
case 1: word[i++] = "one"; break;
case 2: word[i++] = "two"; break;
case 3: word[i++] = "three"; break;
case 4: word[i++] = "four"; break;
case 5: word[i++] = "five"; break;
case 6: word[i++] = "six"; break;
case 7: word[i++] = "seven"; break;
case 8: word[i++] = "eight"; break;
case 9: word[i++] = "nine"; break;
}
}
for(j=i-1;j>=0;j--){
printf("%s ",word[j]);
}
}
| Is This Answer Correct ? | 1 Yes | 5 No |
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
what is diference between return 0 and return NULL??
in malloc and calloc which one is fast and why?
What is stack in c?
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.
main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }
marge linklist
show how link list can be used to repersent the following polynomial i) 5x+2
int main() { int days; printf("enter days you are late"); scanf("%d",days); if (days<=5) printf("5o paisa fine"); if (days<=10&&days>=6) printf("1rs fine"); if(days>10) printf("10 rs fine"); if(days=30) printf("membership cancelled"); return 0; } tell me whats wrong in this program? is it right?
Explain what is wrong in this statement?
What are the types of data files?