Printing value in Decimal, Octal, Hexadecimal using printf in C
This code snippet will print an entered value in Decimal, Octal and Hexadecimal format using printf() function in C programming language. By using different format specifier we can print the value in specified format.
Print value in Decimal, Octal ad Hex using printf() in C
Output
Here, following format specifiers are used: