id_sequence[1] = 234;
id_sequence[2] = 345;
id_sequence[3] = 456;
Since the array is only allocated to hold three elements, the valid indices are 0 to 2; so, the assignment to id_sequence[3] is out of bounds.