My C++ Quiz

The ultimate place to learn C++!

Question #39: The code below is legal. True or false?

#include <iostream>

const char* Foo()
{
  return "Hello World";
}

int main() 
{ 
  const char* str = Foo();
  std::cout << str << std::endl;

  return 0;
}