Program to print the hexa and octal number


#include<stdio.h>
#include<conio.h>

main()
{
      int x=735;
      short int y=40;
      unsigned int u=0xf179;
      float f=49.759;
      double d=99.4321;
      char c='k';
      
      printf("Integer printing");
      printf("\nInteger : %d, Octal : %o, Hexadecimal : %x",x,x,x);
      printf("\nInteger : %d, Octal : %o, Hexadecimal : %x",y,y,y);
      printf("\nUnsigned");
      printf("\nInteger : %d, Octal : %o, Hexadecimal : %x",u,u,u);
      printf("\nFloating point printing");
      printf("\n%f   %e",f,f);
      printf("\n%.2f    %.2e",f,f);
      printf("\nCharacter Printing");
      printf("\n%c",c);
      getch();
}

Comments

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples