output[i] is equivalent to *(output + i)
In the first you are using the array index operator []
to access an element in an array. C-style arrays and pointers are very similar, so you can use the array index operator on a pointer to access the pointed-to data (at some offset).
You can also access the pointed-to data with the pointer dereference operator as you have suggested, but the array index method is cleaner in my opinion.