Printing value in Decimal, Octal, Hexadecimal using C-programming.

0
12
#include<stdio.h>
int main()
{
    int value=1425;
    printf("Decimal value is: %d\n",value);
    printf("Octal value is: %o\n",value);
    printf("Hexadecimal value is (Alphabet in small letters): %x\n",value);
    printf("Hexadecimal value is (Alphabet in capital letters): %X\n",value);
    return 0;   
}
Output:
Decimal value is: 1425
Octal value is: 2621
Hexadecimal value is (Alphabet in small letters): 591
Hexadecimal value is (Alphabet in capital letters): 591

LEAVE A REPLY

Please enter your comment!
Please enter your name here