Answers for "initialize dynamic array c++ to 0"

C++
7

initialize whole array to 0 c++

int nScores[100] = {0};
Posted by: Guest on July-31-2020
2

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 "initialize dynamic array c++ to 0"

Browse Popular Code Answers by Language