c++ allocate dynamic with initial values

C++
int length = 50;
int *array = new int[length]();
// returns 50 length array of 0
Source

Also in C++: