seriously disabled Posted November 21, 2009 Share Posted November 21, 2009 What does the prefix 0x (as in 0x565) mean in the hexadecimal numeral system? What is this prefix for? Link to comment Share on other sites More sharing options...
Dudde Posted November 21, 2009 Share Posted November 21, 2009 *nix (UNIX and related) shells, and likewise the C programming language, which was designed for UNIX (and the syntactical descendants of C[2]) use the prefix 0x for numeric constants represented in hex: Wiki looks like to denote the following number is hex hope this helps Link to comment Share on other sites More sharing options...
Cap'n Refsmmat Posted November 21, 2009 Share Posted November 21, 2009 It's a prefix to indicate the number is in hexadecimal rather than in some other base. The C programming language uses it to tell the compiler "this is hex, not some meaningless letters and numbers." Link to comment Share on other sites More sharing options...
seriously disabled Posted November 22, 2009 Author Share Posted November 22, 2009 Ok I get it now. Thanks a lot for the explanation guys! Link to comment Share on other sites More sharing options...
khaled Posted January 25, 2012 Share Posted January 25, 2012 (edited) 0x[0-9|A|B|C|D|E|F]+ : Hexadecimal 0[0-7]+ : Octal int Piano = (0xCDEFAB); // hexadecimal (0x..) int Zero = (00); // octal (0..) int JamesBond = (.007); // decimal (.xxx) Edited January 25, 2012 by khaled Link to comment Share on other sites More sharing options...
Guest SerDikov Posted February 11, 2012 Share Posted February 11, 2012 IMHO, it is debatable all this Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now