Hey everyone..
So i'm adding arrays to the already long-enough list of C concepts that i don't understand. I looked at the tutorial on this site and i've googled for info on arrays; nothing i have read has helped me understand any better so i was hoping someone here could maybe explain what's happening in layman's terms.
To be clear, this is not homework, this is just an example practice question that i don't quite understand..
What is the output of the following program?
now i put this into codeblocks and the output was '98981.' However, i don't understand how. I guess my real question is this: What's going on within the for loops?Code:Int main() { Int array[5] = {3, 6, 2, 7, 1} Int I; For (i=0; i<4; i++) Array[i] = array[i] + aray[i+1] For (i=0; i<5; i++) Printf(“%d”, array [i]); Return 0; }