I am pretty new to C and I have got a problem here in C:
I want to write a program which reads a txt file and writes the content it a char[50][50].
To read the file I used fopen but I have no idea how to write this into the array. What is a good way to solve this?
EDIT: @BLUEPIXY’s answer is significantly better than this approach.
@Hidde’s code adapted for this specific example:
Really there should be some code to check that the input file meets your expectations, otherwise strange things may happen.