I am trying to write some code that will open a file, read its content line by line and store each of these lines into an array.
First I open the file and count the
You haven't created an array of strings, you've created a pointer to an array of strings. you need to malloc your array in part2 to be count of lines * number of char's per line. then move your read lines into each subsequent position of array.
[edit]
one more thing.....
your strings are X length. 'C' strings aren't X length, they're X+1 length :)
[/edit]