Ad
  • Custom User Avatar

    Code with undefined behavior

    (*values)*(*values++)
    

    Order of evaluation of the operands of any C operator, including the order of evaluation of function arguments in a function-call expression, and the order of evaluation of the subexpressions within any expression is unspecified (except where noted below). The compiler will evaluate them in any order, and may choose another order when the same expression is evaluated again."
    https://en.cppreference.com/w/c/language/eval_order

    This code can take \*values from right part, increment, and take next element of array for multiplication.