Plot Allotment Number

Problem Statement:

"FarwayHome" is an online platform that provides its users with property buying and selling services. Through this platform a buyer can register a plot online. Each buyer is provided with a plot registration number. When a customer buys a plot from a seller, the system automatically generates a plot allotment number through the registration number. To generate the plot allotment number, each even digit of the plot registration number is replaced by the Kth digit after it in the number. The odd digits in the number are not replaced. For the last K digits, the series of digits in the plot number is considered in the cyclic manner.
Write an algorithm to find the plot allotment number.

Input Format:
The first line of the input consists of an integer – plotRegistrationNum, representing the plot registration number.
The second line consists of an integer – valueK, an integer representing the value of K.
Output Format:
Print an integer representing the plot allotment number.
Note: Consider zero(0) as an even and one(1) as an odd number.
Constraints:
0 < plotRegistrationNum >= 10^5
Sample Input:
25643
3
Sample Output:
45253
Solution in C JAVA PYTHON
#include<stdio.h>
#include<string.h>

int main() {
  int i,k;
  char reg[10],plotno[10];
  scanf("%s",reg);
  scanf("%d",&k);
  for(i=0;i<strlen(reg);i++){
    if((int)reg[i]%2==0){
      plotno[i] = reg[(i+k)%strlen(reg)];
    }else{
      plotno[i] = reg[i];
    }
  }
  plotno[i] = '\0';
  puts(plotno);
  return 0;
}
Input
25643
3
Output
45253