Assignment # 3: (Link List)
Assignment # 3: (Link List)
Assignment # 3
Struct and Pointers
Submission Dead Line: Friday 22/3/2018
PROVIDE PROPER INDENTATION AND COMMENTS WITH YOUR CODE
YOU MUST DEALLOCATE ALL MEMORY PROPERLY, YOUR CODE SHOULD NOT HAVE
ANY MEMORY LEAKS OR DANGLING POINTERS.
NO ASSIGNMENT WILL BE ACCEPTED VIA EMAIL.
Head Tail
NULL
A B D ‘‘ F G L K
NULL
struct Node{
Char * data;
Node* next;
Node * prev;
}
What to Implement?
1. Deletion of a character from the editor and from the linked list too.
2. Insertion of a character in the editor. So if a user places the cursor in between text, characters
should get inserted. Insertion has to be done correspondingly in the linked list also.
3. Up, down, left, right arrow keys to navigate text are already implemented but you have to add any
additional logic that you require there. (For example, making the list pointer to move in both
directions if required)
4. Search (function key F1) for a string in the entered text. The user can enter a word/string to find at
the bottom of the text editor. After inputting the text, the system should search for an instance of
that string in the text (starting from the character at cursor position) and the cursor should jump to
that location where that character is found.
5. Implement backspace functionality, which should work as normal backspace key works.
6. Cut and Paste functionality
7. Save (function key F2) should save the text in a file called
8. ‘myeditor.txt’. Escape key should exit the editor. (Already implemented)
Happy Programming