Paste in string

ascii conversion is correct but not able to push the correct value in a new string.

@deepak_g22 lets suppose the difference in ASCII code is of 2-digit number. A 2-digit number cannot be stored at one index of string. It’s better to store the result in an integer array.
Store the characters at even places and difference of their ASCII at odd places of the integer array.

I got your point Thanks(and the code worked). But I am not able to store a number in a string even single digit and also not able to store an int in the char array by using type cast or any thing.
I was thinking of storing the int number by converting it to a character and storing in char array, even not able to do so with single digit.

See if the number is negative even though its a single digit integer it will take up 2 spots, one for the digit and one for β€œ-” sign. Also, 2-digit numbers can only be stored one digit per index in string or char array after type casting them to character. So, it’s better to use the integer array.
Hope this helps.
And if your problem is solved, I request you to mark the issue as resolved.

If you want to store, lets say 34 in a char array. The only way possible is to store it as char(3), char(4) at two different indices. Also, -2 has to stored as char(-) and char(2), as there is no ascii value for -2, but there is for β€œ-” and β€œ2” separately.