things about realese memory for characters array and array of char array
:devil:im stuck in the memory problem
then, string will equal to every line from user stdin,
while (fgets(string, 10, stdin) != NULL)
// printf string
i tried to stdin two times, first time, i input "hello ha\n" first, then print string => "hello ha"
then, if i input "hello\n", the print out string is "hello", this is fine, but if i print string, the output is 'o'.. is this because the original memory didn't released, so the index 7 still have the previous value?
but if this is why, then why the output if print string is "hello"?
2, talking about memory, is there any formal way to release previous array memory, for example, if im dealing with char matix an array of characters array, how to clean all the value i assigned to matix before, then i can assign new value to it again
~~~~!!!!!!~!~!~!~!~!~!~! looking forward some replys