Will the code below preload an array of 100 locations with the
value 10000?

size - 100
int memory[Size]
const int mem = 10000;


int *p, memory[Size];
for ( p = &memory[0]; p < &memory[Size]; *p++ )
*p++ = mem;

Please advise if there is a better way. It is an exercise that should use pointers.

Thanks