Depending on the size of a 5 is not enough for b. You need to have room for the NULL at the end and a possible minus sign. Therefore, b should at least be char b[7];
↧