Add One to Each Digit of a Number in C

This C program adds 1 to each digit of a given number. When a digit is not 9, it simply increases by 1: 3→4, 5→6. When a digit is 9, it wraps to 0 and carries +1 to the next digit to the left. This carry propagates: if the next digit is also 9, it …