Usual problem - check to see if there's at least one character available to read, then go ahead and read all 18 of them.
Also, array indices usually begin at zero.
. I dont know what i have done wrong in my code but i am not able to get it to work.
You need to define what "work" means to you in this context.
AWOL:
Usual problem - check to see if there's at least one character available to read, then go ahead and read all 18 of them.
I agree that is a problem with the code as posted.
AWOL:
Also, array indices usually begin at zero.
They do, but oddly, part of the code (the read loop) is 1-based while another part (the parsing) is correctly 0-based. As an example, the first bit of actual information is the fourth character, "Red Value Hundreds Character ASCII" and the code correctly accesses this fourth item as