memset

(void) Sets a block of memory at pToBuffer to the value nValue. nNumbOfBytes is the number of bytes to set. This is a useful function for initializing the value of an array to all zeros. Identical to the function found in conventional C 'string.h' library.

int kSendSize = 1; // we will be sending 1 byteubyte BytesToSend[kSendSize]; // create a ubyte array of size 1short nMsgXmit = 0; // we will be setting them to 0memset(BytesToSend, nMsgXmit, sizeof(BytesToSend)); // set the Byte Array to 0