cout: hex : cout dec oct hex « Development « C++ Tutorial






#include <iostream.h>
#include <iomanip.H>

main(void)
{
       long n = 10000;
       cout << hex << n ;
       return 0;
}
2710"








5.4.cout dec oct hex
5.4.1.cout: hex
5.4.2.cout: oct
5.4.3.cout: dec
5.4.4.To output in hexadecimal
5.4.5.Using hex, oct, dec and setbase stream manipulators.