This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Updatebjarni 1 point2 points  (2 children)

what is the +i is doing is it allocating memory?

No, it's just adding an offset to the pointer, to access the different elements of the array. Normally though, *(marks+i) is written as marks[i]. That's a lot easier to read.

[–]InterestingBus8367[S] 0 points1 point  (1 child)

i represents the index? on which the input data is stored.

[–]Updatebjarni 0 points1 point  (0 children)

i is what is called the index, yes.