How do you assign an octal value to a number?
Assigning an octal value to a variable is as easy as assigning a hexadecimal value to a variable, except that you
need to know the octal numbering system in order to know which numbers to assign.
need to know the octal numbering system in order to know which numbers to assign.
int x;
x = \033; /* put octal 33 (decimal 27) into x */
x = ‘\033’; /* put the ASCII character whose value is
octal 33 into x */
Refer to FAQ XX.23 for detailed information on the octal numbering system.
Cross Reference:
XX.23: What is octal?
No comments:
Post a Comment