[Solved] Writing to a file in C not working
In your code, characters is of type char which is not fit to store a string. You need to make characters as an array. Essentially, what happens behind the hood is, because of %s, the input value (even if a single char) gets stored in the memory pointed by the address supplied, but after that, … Read more