How to delete a characters from an array buffer for example I have an array buffer of length 14 it can store this string "?01SRR00080065" but i want to store a size of 8 character buffer IE "?01SRW68" when i run the program i am getting "?01SRW68080065" this output that means overwriting to the previous string,how can I get an output as"?01SRW68" in the same buffer of 14 size.I am doing an Embedded application in that the serial port receive these strings.
Your routine probably shows the content until it finds a null character so basically write the 8 characters that you want in positions 0-7 and set position 8 to null (array[8]=0.
Character is a byte variable. Array of chars is pointer to memory, where this variable stores. You can't just delete a character. You should use an routine that will recount the array with your rules.