Declare And Initialize A Decimal Constant And Output It's Octal And Hexadecimal Value To User
Declare And Initialize A Decimal Constant And Output It's Octal And Hexadecimal Value To User
In this example, you will learn to Declare And Initialize A Decimal Constant And Output It's Octal And Hexadecimal Value To User in C language.
Code For "Declare And Initialize A Decimal Constant And Output It's Octal And Hexadecimal Value To User".
/* Author --> HARSH PATEL */
#include<stdio.h>
int main ()
{
int num1=10;
printf("Octal Value of %d is %o",num1);
printf("\n Hexadecimal Value of %d is %x",num1);
return 0;
}
Output
Octal Value of 10 is 25556035050
Hexadecimal Value of 10 is
- Now Program End Without Any Error.
![🖥️](https://fonts.gstatic.com/s/e/notoemoji/14.0/1f5a5_fe0f/32.png)
![👨🎓](https://fonts.gstatic.com/s/e/notoemoji/14.0/1f468_200d_1f393/32.png)
![👩🎓](https://fonts.gstatic.com/s/e/notoemoji/14.0/1f469_200d_1f393/32.png)
- If Any Query Regarding Programs, Website Or More Details Email Us On Contact@CodingWithHarsh.gq