+ 1

Please explain output

Int a = 028; While trying to run this statement , why will there be an error?

10th Dec 2020, 8:47 PM
Milind Ghag
Milind Ghag - avatar
1 Answer
+ 8
int a = 028. Here starting with 0 means number is in octal form. And octal form representation will don't have digits more than 7. It only have digits between 0 to 7. So having 8 is error. then it's Not a proper number.
10th Dec 2020, 9:28 PM
Jayakrishna 🇼🇳