String Compression

please explain and comment the changes made
here is the code:

Changes made with respect to what?
I can only see one code file which is incorrect as an int array is being displayed instead of the modified string, resulting in the display of array address as output. The updation of the i variable inside the loop is also wrong

if you make any changes please EXPLAIN and COMMENT . how to update the value in loop
please explain via code

image

vector has not been taught yet do you have meathod without using vectors.

Bro then use a char array.
Keep size same as original string
However add a ā€˜\0’ at the end of compressed string in the char array to denote the end

i have done it but there is some error

Bro why are using same i index for c also? Keep a different index for that as the two are different strings
int k = 0;
c[k++] = count
Also it should be c[k++] = s[i] and not s[i] = c[i]
Also I had removed some wrong statements from your code you again inserted them back (like sorting the string)
Please again look at the code that I have sent
You have just changed what I told in the last message

Everything before this you have kept as it is
Please go through it again

I have made the changes your changes are not visible on IDE here are some of changes I have made

I have sent images of my code

Bro you have just made one change out of the suggested 4

i have marked the changes made

Line 20 also Ketan bro
C array should have same index k

Also Please see the changes that I had made in my code. I have even commented why I did what I did but you are not looking at that I dont know why.
Why did you still do c[i] = count when I have clearly done (count+49)?

Please first look into the code given below this message as images, understand the comments, understand the code and then ask

what is the reason for adding 49 you have mentioned but I’m unable to understand

Because 49 is the ascii code of 1
If you directly do 0 it will print character 0 which is a special character