byte output = data[2]; //note that the third byte is not entry 3
Wrap that in a function if you need to and pass the function the name of the array and the entry number to get and return but frankly it it simpler to just use the single line of code above
If I may suggest, this is such a basic langage question that What might be really helpful would be for you to take a couple hours to read about the syntax / grammar and vocabulary of the C langage. That will be time well invested
J-M-L:
If I may suggest, this is such a basic langage question that What might be really helpful would be for you to take a couple hours to read about the syntax / grammar and vocabulary of the C langage. That will be time well invested