Print the decimal value 100 in hexidecimal form preceded by 0x - C++ File Stream

C++ examples for File Stream:cout

Description

Print the decimal value 100 in hexidecimal form preceded by 0x

Demo Code

#include <iomanip>
#include <iostream>
#include <limits>

int main(int argc, const char *argv[]) {

    std::cout << "0x" << std::hex << 100 << std::endl;

    return 0;// w ww. ja  v  a2 s .  c o  m
}

Result


Related Tutorials