So I don't really understand why when I use for loop to store numbers from 1 to 4 I get random numbers? When I use for loop without an Array Everything works just fine, but when i add Array, the numbers I get are random, can someone explain why the numbers are random? Here is the simple code:
int i, arr[5];
for(i=1; i<5; i++){
printf("%d ", arr[i]);
arris not initialized.arrin that loop, Sans initialization, the content ofarris indeterminate.