[ad_1]
Yes, signed integer overflow has undefined behavior in C.
i > INT_MAXis never true for anyint i. How can you have anintgreater than the maximum possibleint?
[ad_2]
solved Strange behaviour when intentionally assigning `i` value greater than INT_MAX [duplicate]