C Update Array Length Function In C