In C++, on object creation, is new used implicitly?

Viewed 253

When I create an object of a class, say,

class A {
  public: A() {}
};

A a;

Is only the constructor called? Or is it that the new operator is used implicitly?

Like we have to do A* b = new A();

Also, where will a and b be stored in memory? Stack or heap?

2 Answers
Related