Hi please how the argument (int index) became inside [index]
@ProfessorHankStalica Жыл бұрын
If I understand the question, that's how pass by value works. The contents of the argument get copied into the parameter. A parameter is a type of local variable you can use within the function. So, the value inside the parameter is used how you would use any other variable.
@faizaniftikhar9 ай бұрын
What happens if you run this on an array of Foo? for e.g. if you've declared Foo a[10] instead of Foo a, then what would we get on calling a[2] ?