Quote:
I believe you expected C to set newly allocated memory/variables to be zero

No, I do not expect the allocated memory to be initialized to zero automatically.
Thats why I want memset to do this. ; )

However, memset does not work in my example (first post).

Of course, I could use for loops as suggested by Schmerzmittel, but obviously memset is faster than for loops.
So I wourld prefer to get memset working properly. : )