[Solved] for loop: make increment and accessing in one loop
doing for( int i =0; i++<10; a[i-1]=i ) { printf(“%i:%i\n”, i-1, a[i-1]); } you set the entries after you print them because a[i-1]=i is executed after the body of the for, so you print non initialized array entries your code is also ‘complicated’ because you increase i too earlier in the test part of for, … Read more