If your 2D array has a static storage duration, then it is initialized by default to zero, i.e. all array members are set to zero.
If the 2D array has an automatic storage duration, you can use the list of array initializers to set all members to zero.
int arr[10][20] = {0}; // easier way
// this does the same
memset(arr, 0, sizeof arr);
, memset .
int *arr = malloc((10*20) * (sizeof *arr));
memset(arr, 0, (10*20*) * (sizeof *arr));