Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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] <<" "; }
 
PREVIOUS NEXT
Tagged: #initialize #dynamic #array
ADD COMMENT
Topic
Name
4+1 =