rm -rf ~/systems/*The symbol '*' is a wild character that stands for "everything", so we remove everything (files and directories) located in the systems directory.
emacs digitsum.cRemember to use Ctrl-x Ctrl-s to save your file, Ctrl-x Ctrl-c to exit, and Ctrl-g to cancel a partially typed or accidental command. Save your code frequently.
Using the editor, write C code for a program that reads in a positive integer and prints out the sum of all digits. For example, if the user types in the number 528, the program should output 15. Here is a sample program execution (user input is in italics):
Please enter a positive integer: 345 The sum of digits is 12
gcc digitsum.c -o xdigitsum
gcc (which stands for GNU Compiler Collection) is the name of the compiler. The first argument digitsum.c is the name of the C program you wish to compile. The option –o informs the compiler that the argument to follow (in our case xdigitsum) is the name of the executable program to be produced as result of the compilation. You can give any name you wish to the executable, however including your program name in the executable name (without the .c extension) is a good rule of thumb, so you can easily associate an executable with the corresponding source code. Pay careful attention to error and warning messages, and eliminate them all.
./xdigitsumSo you invoke the executable by its name, but you need to specify the entire path (in this case, relative to your current directory) for the executable.
This activity will not be graded.