A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Underscores in Numeric Literals doubt
Joined: Feb 09, 2012
Jun 26, 2012 05:11:54
int j=0x_52;//not valid int i=0_52; //(octal)why it is valid ? //rule:we cannot put underscore at the beginning of a number.
I've mindset that as 0x is used to represent hex number same as 0 at 0_52 is being used to represent octal number so actual number will be 52.Hence _ before 52 should not be valid.please help
Tell the difficulties that i am difficult.
Joined: Jul 20, 2005
Jun 26, 2012 05:26:48
Locking this one. Please continue this discussion in your other thread here
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Underscores in Numeric Literals doubt
Range of Octals
Octal number conversion
How many digits an octal number have ?
Underscores in Numeric Literals
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014