I am not going to give you exact code but I will give you some links that will help you.
strchr :: You can use this find the position of ‘=’ in the string.
- Now, copy the string after the position of ‘=’ till you find a ‘space’.
- Whenever you will find a ‘space’, write a ‘#’ in the buffer.
- Keep doing this, till you encounter a ‘\0’. Write ‘##’ to buffer when you have encountered ‘\0’
- Append that with a ‘\0’.
Ex:: C function strchr – How to calculate the position of the character?