Saturday 17 September 2011

SIMPLE TEXT EDITOR


SIMPLE TEXT EDITOR
AIM:
To implement simple text editor with features like insertion/deletion of a character, word
and sentence in C language.
ALGORITHM:
1. Design a Menu using switch case
2. Get the choice
3. If choice is “1” then, enter the filename in which the text is to be saved and, type the text using editor and
type CTRL+Z to terminate
4. If choice is “2” then enter the filename to be open, If the filename is found, open the file in read mode
else display not found
5. If choice is “3” then replace the existing file by a new file name
6. If choice is “4” then insert character or word or sentence


Output:
------------
texteditor
------------
options
1. create a new text
2. deleting a char
3. inserting a char
4. open a file
5. insert a Word
6. delete a Word
7. exit
1
enter your Data Here(Esc to stop):
unix is a os
options
1. create a new text
2. deleting a char
3. inserting a char
4. open a file
5. insert a Word
6. delete a Word
7. exit
2
Data in the file:
unix is a os
Enter the position for deleting the character:
2
uix is a os
options
1. create a new text
2. deleting a char
3. inserting a char
4. open a file
5. insert a Word
6. delete a Word
7. exit
3
Data in the file:
uix is a os
Enter The position for inserting the character:
2
Enter the character:
n
unix is a os
options
1. create a new text
2. deleting a char
3. inserting a char
4. open a file
5. insert a Word
6. delete a Word
7. exit
5
Data in the file:
unix is a os
Enter The position for inserting the word:
5
Enter the Word:
is
unix is is a os

options
1. create a new text
2. deleting a char
3. inserting a char
4. open a file
5. insert a Word
6. delete a Word
7. exit
6
Enter The position for deleting the word:
6
Enter the Word:
is
unix is a os

0 comments:

Post a Comment