Tuesday, October 30, 2007

Assigned value starts with zero in C / C++

Any assignment that starts with zero is taken as Octal.
That is
Int x = 011;
Cout << x;
// will print 9
// will show 80 X 1 + 81 X 1 = 9