My C++ Quiz

The ultimate place to learn C++!

Question #30: Given the assumptions in the comments, what values is printed for x?

int main(int argc, char** argv)
{
  // assume result printed is 4
  std::cout << sizeof(int) << std::endl;

  int x = 0x1000;

  x = x << 32;
  
  std::cout << std::hex << x << std::endl;

  return 0;
}