Pls find below where I have explained with data in the array after case 1 & case 2.
char sc_ArrData[ 100 ];
strcpy(sc_ArrData,"Hai" );
Case 1:
sc_ArrData[0] = '\0';
Result:
- "sc_ArrData"
[0] 0 ''
[1] 97 'a'
[2] 105 'i'
[3] 0 ''
Case 2:
memset(&sc_ArrData[0], 0, sizeof(sc_ArrData));
Result:
- "sc_ArrData"
[0] 0 ''
[1] 0 ''
[2] 0 ''
[3] 0 ''
Though setting first argument to NULL will do the trick, using memset is advisable