Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

iPad 2-23 PM 56% instructure-uploads s3.amazonaws.com 2.1 Challenges For the cha

ID: 3875677 • Letter: I

Question

iPad 2-23 PM 56% instructure-uploads s3.amazonaws.com 2.1 Challenges For the challenges, you have to find the (minimal) sequence of keystrokes that gets from the initial text to the result text. The position of cursor is on the red bold letter Stay away from the arrow keys, and use the proper shortcuts · 1. Moving cursor (6pts) Initial Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo re et dolore magna aliqua. Ut enim ad nini venían, quís nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Result: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minin venian, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 2. Insertion/deletion (6pts) Initial: Lorem ipsum dolor sit amet, consectetur adipiscing elit, Result: oeLrm ipsum dolor sit amet, consectetur adipiscing elit, 3. Append/Open new line (6pts) Initial: Lorem ipsum dolor sit amet, consectetur adipiscing elit, Result: Hello! Lorem ipsum dolor sit amet, consectetur adipiscing elit, latin

Explanation / Answer

4.

sed stands for stream editor

-i means in-place which means. save back to the original file

s is the substitute command

tmp: old string

time_elapsed: new string

g stands for global i.e. replace all and not just the first occurrence

file.c is the c file where the replacement is to be done

5. :!gcc -o mainexec % && ./mainexec
When using :!, % sign would be replaced by the name of the currently opened file and hence the executable will be formed