You can parse all three variables with one scanf
call. Note scanf
returns the number of input variables assigned. I think you need something like this:
int n1, n2;
char buf[12];
...
...
sscanf(readIn, "%d %s %d",&n1, buff, &n2);
*instructionCounter2 = n1;
instructionSet2[*instructionCounter2] = stringCheck(buff);
instructionSet2[*instructionCounter2] += n2;