Hmm, yes. Rather odd. I wonder why int's are handled differently?
Anyway, I testad a bit and came up with this that appears to work OK.
The one memset line is the important line you are after, and the rest is there
so you can see it in action, based on your original post in this thread.

As usual, any question or problems, just ask...
Code:
   // allocate memory for 100 integers
   int* array = (int*)malloc( (int)sizeof(int) * 100 );
   
   // initialize memory to 5's
   int i; for(i=0; i<100; i++) array[i]=5;
   
   // display int #11 on the screen (should be five)
   error(str_for_num(NULL, array[10] ));
   
   // display int #61 on the screen (should also be five)
   error(str_for_num(NULL, array[60] ));
   
   //reset elements 50-100 to zero
   memset(&(array[50]), 0, ((int)sizeof(int) * 50) );
   
   // display int #11 on the screen (should still be five)
   error(str_for_num(NULL, array[10] ));
   
   // display int #61 on the screen (should now be zero)
   error(str_for_num(NULL, array[60] ));
   
   //clean up when done
   free(array);



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial