Here is source code of the C Program to merge lines alternatively from 2 files & print result. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
* C program to Increase 1 to all of the given Integer Digit
int number, sum = 0, remainder, count;
printf("Enter a number: ");
remainder = number % 10;
sum = sum + (remainder + 1);
number /= 10;
printf("increasing 1 to all digits: %d", sum);
$ cc pgm52.c $ a.out Enter a number: 3456 increasing 1 to all digits: 22
Sanfoundry Global Education & Learning Series – 1000 C Programs.