C example: insert element in array