You are given two uint8_t numbers — a and b. You have to add them and store in 8-bit variable only. As addition may overflow (>255), you have to
Note: You can use only 8-bit variables. No uint16_t, no casting to larger types.
Example-1
Input: a = 255, b = 1
Output: sum = 0, carry = 1
Example-2
Input: a = 200, b = 100
Output: sum = 44, carry = 1
Input
100 50
Expected Output
150 0