Answers for "how to initialize an dynamic array with 0 in c++"

C++
4

initialize dynamic array c++ to 0

int *arrayName = new int[10]{0}; 
//Print array elements
for(int i=0; i<10; i++ { cout<<arrayName[i] <<" "; }
Posted by: Guest on October-06-2020

Code answers related to "how to initialize an dynamic array with 0 in c++"

Browse Popular Code Answers by Language