My C++ Quiz

The ultimate place to learn C++!

Question #33: True or False, the program below will print NOT EQUAL

#include <iostream>

struct Foo
{
};

struct Bar 
{
};

int main(int argc, char** argv)
{
  Foo* f = new Foo;
  Bar* b = new Bar;

  if ( f == b )
    std::cout << "EQUAL" << std::endl;
  else
    std::cout << "NOT EQUAL" << std::endl;

  return 0;
}