In linea generale basta una memset.
codice:
    memset(buffer,0,100);
per azzerare tutti i byte.