2 Posted Topics
REVERSED ORDER char sh[100]=""; char sh1[100]; int convertHex(int num) { quotient=(num / 16); remainder=(num % 16); if (remainder <= 9 && quotient >= 1) { printf("%d",remainder); convertHex(quotient); sprintf(sh1,"%d",remainder); strcat(sh,sh1); } else if(remainder > 9 && quotient >= 1) { printf("%c",((remainder-10)+'A')); convertHex(quotient); sprintf(sh1,"%c",(remainder-10)+'A')); strcat(sh,sh1); } else if(quotient <= 0) { if(remainder …
[code] #include <stdio.h> main() { int number; int ch; char sh[100]; int i=0,j=0; printf("input No in Hex: "); scanf("%s",&sh); number = 0; i =strlen(sh); j=0; while(i!=0) { ch = sh[j]; printf("Ch:%d\t%d\t%d\n",ch,'7',ch-'7'); if(('0' <= ch && ch <= '9')) { number = number * 16; printf("Number :%d\n",number); number = number + …
The End.
mapla