Add integers safely, and prove the safety
问题 Programming course assignment asks to write a (safe) function that adds two integers, and show that the function is safe. The following code represents my solution. I am not an expert on the C standard (or on formal verification methods). So I would like to ask: Are there better (or different) solutions? Thank you #include <limits.h> /* Try to add integers op1 and op2. Return 0 (success) or 1 (overflow prevented). In case of success, write the sum to res. */ int safe_int_add(int * res, int