I was trying to fill an array,xlow, by extracting some elements from an array called exit_2. By making the array xlow, I wanted access specific elements of it but the code gives some weird numbers.
#include <stdio.h>
int main()
{
int exit_1[4]={3,0,7,11},exit_2[4]={90,164,232,328},xlow[2],i;
for(i=0;i<4;++i){
if(exit_1[i]<7){
xlow[2]=exit_2[i];
}
}
printf("%d",xlow[0]);
return 0;
}
Thank you your help