Design and implement a basic text editor in C that manages text data using a 2D array. The program reads text from an input file, stores each line as a separate row in a 2D array, and supports interactive commands to modify the text.
Key requirements:
input_q1.txt:
This class is ESE 124: Programming Fundamentals
The current lab is Lab 5, 2D Array Processing
This is part 2's sample input file
This file can contain at most 10 lines
This file can contain at most 10 words
Each word can have up to 32 characters
This input file has 7 lines.
A 2D character array stores text as a grid:
char data[MAX_ROW][MAX_COL];
// ↑ ↑
// 10 lines 50 chars per line
Visualization:
Row 0: ['T']['h']['i']['s'][' ']['c']['l']['a']['s']['s']...
Row 1: ['T']['h']['e'][' ']['c']['u']['r']['r']['e']['n']['t']...
Row 2: ['T']['h']['i']['s'][' ']['i']['s'][' ']['p']['a']['r']['t']...
...