I\'ve written the following program to read line by line from a file and store it in the words array. The output should be two random words from the array. But surprisingly
You repeatedly overwrite the memory in line_buffer. The words array contains only pointers this variable.
You should either use a multi-dimensional array or allocate memory at runtime.
Btw: Bad things will happen when you pass more than 20 lines to your code ...