int x = 750;
int i = 0;
while (pow(2, i) < x) {
i++;
}
printf("i is currently %d\n", i);
int array[i];
while (i > 0){
i--;
printf("The value of array %d is %d\n", i, array[i]);
}
When I do this, it creates some really crazy values. I've heard of trying to use malloc or memset, but the values didn't change. All I want to do is set all of these to zero so that I can use it as a counter. Thanks!