C program to convert Hexadecimal to decimal number

This page has a C program to convert Hexadecimal to decimal number. We can easily write the C program to convert a given mixed Hexadecimal number into decimal number equivalent. To convert the Hexadecimal number, we should multiply the each digits present in the given Hexadecimal number with its weights and add the products together to form the hexa decimal equivalent. Substitute the hexa symbols 10 for A, 11 for B, 12 for C, 13 for D, 14 for E, and 15 for F. For Example: Let us find the decimal equivalent of Hexadecimal number (3A4D.3A5C)16 using the below given converter program. The Given Hexadecimal number: (746.124). The Decimal equivalent is calculated as: 3*16*16*16 + 10*16*16 + 4*16 + 13*1 + 3*1/16 + 10*1/(16*16) + 5*1/(16*16*16) + 12*1/(16*16*16*16) = 14925.2279663 Decimal equivalent of (3A4D.3A5C) is (14925.2279663) The below given C program is used to convert a given mixed Hexadecimal number into decimal number. Kindly check out the program to convert Hexadecimal to decimal number.