What does the prefix 0x (as in 0x565) mean in the hexadecimal numeral system? What is this prefix for?
Welcome to ScienceForums.Net!
|
After you've registered, come in and introduce yourself, or visit the forum index. If you need any help registering, posting, or if you just have some questions about our site, please feel free to contact us at staff at scienceforums dot net.
|
|
| Guest Message © 2012 DevFuse | |
Page 1 of 1
What does the prefix 0x mean in hexadecimal?
#2 21 November 2009 - 11:55 PM
Quote
*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
Having a pet rat is like having a dance studio next to a marble factory; hilarity is bound to ensue...its only a matter of time.
~ Blike
~ Blike
- Posts: 1,392 | Joined: 01-March 03
Reply
#5 25 January 2012 - 01:02 PM
0x[0-9|A|B|C|D|E|F]+ : Hexadecimal
0[0-7]+ : Octal
0[0-7]+ : Octal
int Piano = (0xCDEFAB); // hexadecimal (0x..) int Zero = (00); // octal (0..) int JamesBond = (.007); // decimal (.xxx)
This post has been edited by khaled: 25 January 2012 - 01:17 PM
- Posts: 567 | Joined: 21-April 10
Reply
Share this topic:
Page 1 of 1

Help
Sign In »
Register Now!












