how to initialize all array elements to 0 code example
Example 1: initialize whole array to 0 c++
int nScores[100] = {0};
Example 2: Initialize all the elements of array to 0
int myArray[10] = { 0 }; // all elements 0
int nScores[100] = {0};
int myArray[10] = { 0 }; // all elements 0