I have a dynamic allocation of my pointer array with a length of 10.
Now I want to initialize this array with all "1".
But if I print out the array[2] it shows me 0. If I print out array[1] it shows me a high number like 4905904374893479. Why is this array not set to "1" on all positions?
I don't have much experience with that but I didn't find a solution.
uint64_t *array= malloc((10) * sizeof(uint64_t));
memset(array,1, sizeof(*array));
printf("array[2]: %llu \n", primes[2]);