Description
Exercise #2
Read the .c files and edit them with a text editor to complete them as working programs. Read the Makefile file and use it according to the directions at the top. To complete this assignment you will need to use and editor, such as:
nano, pico |
Easy to pickup. Follow the menu at the bottom for saving and exiting. The ^ represents the Ctrl key, so ^O -> Ctrl-O |
ne |
Another easy to pick up editor, use |
jove, emacs, vi |
More advanced programmer based editors. |
kate, komodo, atom |
Graphical based editors |
To edit a file use the name of the editor, followed by the filename of the file you want to edit, such as:
nano hello.c
You may also need to use the "man" command. To read the manual from section 3 on a C function, such as for "printf" you would type:
man 3 printf
Most of what you need to know is documented in lessons 2 and 3.
Example input / output:
./hello Hello, world! ./math a? 5 b? 10 5 + 10 = 15 ./func Enter an integer: 10 10 + 11 + 12 + 13 = 46