C++ Program for Integer Representation

Master C++ with Real-time Projects and Kickstart Your Career Start Now!!

Program 1

#include<iostream>
using namespace std;
int main()
{
      int a;
      cout<<sizeof(a);
    //  int a=13;  // decimal number
    //  cout<<"\n Decimal : " << a;
    //  int b=013;   //octal number
    //      cout<<"\nOctal to Decimal : "<< b;  
    int c=0xface;  //hexadecimal
     cout<<"\n Hexadecimal to  Decimal: " << c;   // Decimal
    //  return 0;
}

 

Did we exceed your expectations?
If Yes, share your valuable feedback on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *