There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.
And each line in the file represents one row, right ?
>> getting the exact number of rows and colums and scanning correctly is an issue
What you can do, is either :
(a) make a first pass over the file, just to find out how many rows and columns there are (so you can allocate the correct amount of memory), and then a second pass to copy the data.
(b) allocate a 2D array that is big enough to hold any amount of data the file can contain (you mentioned that it's always less than 360), and then simply fill the 2D array with the data from the file.
(c) read the data from the file, and realloc the 2D array to change it's size if needed.