Question: i was trying to convert from a char array to integers and the atoi function is working properly except when i put a zero in the first index...it didn't print it

```
#include<iostream>

using namespace std;

int main()
{
    char arr[]= "0150234";
    int num;
    num=atoi(arr);
    cout << num;
    return 0;
}

```

I expect the output of 0150234 but the actual output is 150234

Answer: 
I think inside the atoi function you have typecasted the string to integer because of which the 0 gets removed. You can never get a 0 printed before a number since it doesn't make sense.
000001 will always be represented as 1.
I hope this clears your doubt.
Binary number representations (such as `int`) do not store leading 0s because there is an infinite number of them. Rather they store a fixed number of bits which may have some leading 0 bits.

You can still print the leading 0s if necessary:

```
std::cout << std::setw(4) << std::setfill('0') << 1 << '\n';

```

Output:

```
0001

```