Complete the following function to clear a block of memory (initialize all the bits to zero). The block of memory starts at pStartByte, and is numBytes long.
void clearMemory(void *pStartByte, int numBytes)
{
{
Complete the following function to clear a block of memory (initialize all the bits to zero). The block of memory starts at pStartByte, and is numBytes long.
1 Comment so far
Leave a comment
void clearMemory(void *pStartByte, int numBytes) {
if (pStartByte == NULL) {
return;
}
char* buffer = (char*)pStartByte;
while (numBytes–) {
*buffer++ = ‘’;
}
}
By kiklop on 12.30.06 10:59 am | Permalink
Leave a comment
If you are including code in your comment, place it within a <div class='code'></div> tag for better formatting.