Update (C), code