Basic functions of a text editor implemented in C with standard library.
gcc --std=c89 -Werror code.c -o binary
$ ./binary
Text Editor
Options:
1 New
2 Open
3 Save As
4 Save and Close
5 Cut
6 Copy
7 Paste
8 Delete Text
9 Display Content
0 Add Text
q Quit
Option: 1
Filename: foobar
File successfully created
Option: 0
Position: 0
String: hello world
Text Added
Option: 9
"hello world"
Option: 8
Position: 0
Length: 6
Text Deleted
Option: 9
"world"
Option: 6
Position: 0
Length: 5
Text Copied: world
Option: 7
Position: 5
Text Pasted
Option: 9
"worldworld"
Option: 5
Position: 0
Length: 3
Text Cut: wor
Option: 9
"ldworld"
Option: 7
Position: 7
Text Pasted
Option: 9
"ldworldwor"
Option: q