To input a decimal number and display in hex, something like:
char buffer[99];
fgets(buffer, 98, stdin);
printf("%x", aoti(buffer));
would be the required core code. Needless to say, there is no error checking, mug trapping, etc. Or if you require the hex in a char[], then replace "printf(" by "sprintf(pointer_to_bufffer,"
221122: Binary = 1000100001000100100010 Octal = 10410442 Decimal = 2232610
10011101: Decimal = 157 Hexadecimal = 9D
Decimal: 170Hex: AA
Convert each group of 4 bits into one hexadecimal digit. 1010 is "A" in hexadecimal, so this particular number is "AA".
D = 13
pongada punda vayanungala ..................
This is not a question.
Write a program to convert a 2-digit BCD number into hexadecimal
WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL
224 = E0
NA
A45C: Decimal = 42076 Octal = 122134
BB895C: Octal = 56704534 Decimal = 12290396
221122: Binary = 1000100001000100100010 Octal = 10410442 Decimal = 2232610
BA = 11*16 + 10 = 176 + 10 = 186
Write a program to convert a 2-digit BCD number into hexadecimal
Whether or not you can do that depends on the size of the number. If the number in question is greater than [decimal] 66535, then you cannot.