Question: Let's consider the following simple program:

```
int main()
{
    int *a = new int;
}

```

Is it reliable that the value of `*a` is `0`. I'm **not** sure about that because primitives don't have default-initialization:

> 
> To default-initialize an object of type T means:
> 
> 
> (7.1) — If T is a (possibly cv-qualified) class type (Clause 9),
>  constructors are considered. The applicable constructors are
>  enumerated (13.3.1.3), and the best one for the initializer () is
>  chosen through overload resolution (13.3). The constructor thus
>  selected is called, with an empty argument list, to initialize the
>  object.
> 
> 
> (7.2) — If T is an array type, each element is default-initialized.
> 
> 
> (7.3) — **Otherwise, no initialization is performed**.
> 
> 
> 

I'd say that `*a` is not initializaed so accessing it would lead to UB. Is that correct?

Answer: 
To be absolutely clear, consider

```
int *a = new int;

int *b = new int();

```

`*a` is **not initialised**, `*b` is initialised to 0.

Use of `*a` prior to initialisation is undefined behaviour.
Yes.

You can value-initialize it (i.e set it to zero for an `int`) by using `new int()`.