pH/ORP stamp using UART port

What I don't is why you made inData a 24 positions vector (why 24 ??)

It needs to be some size. I didn't look at the size of the responses sent back by the sensor, but I don't think they are going to be all that long. If necessary, you can increase the size.

what this line does; inData[index] = '\0';

It adds a NULL to that position in the array (after the last character added). The NULL is necessary to tell the string functions (print(), strlen(), strcmp(), etc.) where the end of the string is.