My code is like below:
#include <string.h>
int main()
{
int ii = 123;
char str[7] = "";
strcpy(str,"123456");
return 0;
}
I run this in VS2010, the memory is like below

I am curious what the cc in the memory used for? And how the number of cc is calculated?
When compile for “Debug” in Visual Studio, the
cc‘s are often used to fill up uninitialized memory. That way it’s more obvious when you access uninitialized memory.For example, if you try to dereference an uninitialized pointer, you’ll likely get something like:
or something like that.