Leading zeroes have no meaning in integral data types. 02 is the same as 2 is the same as 0000002. You can use sizeof to get the size of an integer, but that won't tell you anything about the value it contains.
x is an integer. There is no "length", only a minimum and maximum integer value. Secondly, when you assign 05 to an int, or any number starting with 0, you are assigning an octal number to the int. Try this, and you will get a syntax error.
int x = 039;
The reason is there is no such digit as '9' in octal.
and when you print it, it print as 5. 0 is disregard.
You are responsible for adding leading 0's to whatever integer is printed.
So the rest of your question really doesn't make sense. There is no "position" of 0 in x. There is no "traversing" an integer. An integer is an integer. An integer is not a string.
how do you know the length of x? and when you print it, it print as 5. 0 is disregard.
The 0 is disregarded long before you print it. It's probably dropped as irrelevant at compile time. An integer is not stored as a sequence of digits; it's just a value. You could print it as 5 (decimal), or as 101 (binary), or however you want.
You could certainly tell the program that you'd like to pad the number with leading 0s when you output it; I think setw() and setfill() are the methods for ostreams, while a format specifier like %02d would do it for printf. But that's just a matter of formatting, it doesn't affect the underlying value of the variable.