Input hexadecimal value in C language
In C programming language, we are able to input a hexadecimal value using scanf() function, for that – we use %x or %X format specifier.
Syntax:
scanf("%x", &variable_name);
Example:
Input:
Input a hex value: FA
Output:
Value in hexadecimal format: FA, Decimal format: 250
Program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer