Answers for "new int array c++ initialization to 0"

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 "new int array c++ initialization to 0"

Browse Popular Code Answers by Language