binary to hexa
Our FREE site is mostly funded by the Amazon ads ⇓below⇓.
Support us by clicking ⇑above⇑ next time you plan to buy a product on Amazon.
* C Program to Convert Binary to Hexadecimal
long int binary, hexa = 0, i = 1, remainder;
printf("Enter the binary number: ");
while (binary != 0)
remainder = binary % 10;
hexa = hexa + remainder * i;
i = i * 2;
binary = binary / 10;
printf("THe Equivalent hexadecimal value: %lX", hexa);