Home Segments Index Top Previous Next

792: Mainline

The o and x specifications are used for octal and hexadecimal numbers.

Display number in octal and hexadecimal:

printf ("In octal, 8 is  
                        8,                            10,   10); 
--- Result --- 
In octal, 8 is 10, and in hexadecimal, 10 is a or A.