Systems Software
C Programaming and Introduction to Linux
(counts as Program 12)

  1. Read C Programming Chapters 1-4. Sign and date here when complete._________________
  2. Double-Click VMWare Server and the Desktop and start Fedora Linux
  3. The user name and password are student/student
  4. Bring a USB drive to every class to save your work on because anything left on a machine will disappear.
    I promise to bring a key drive to every class. Sign and date._____________________
  5. Select Application/System Tools/Terminal to create a window running the Bash command interpreter (shell).  Type "help" to learn more.
  6. Two of the editors are gedit and vi. Enter the following program using both editors in file hello.c.
    You may need to google "Linux vi tutorial".
    vi Sign&Date__________________  gedit Sign&Date______________________
    #include <stdio.h>
    int main(int argc, char *argv[]) { printf("hello world\n"); return 0;}
  7. Use pwd to print the current directory path. What is it? ___________________________
  8. Type man mkdir. Type q to quit. Note vi is used for display.
    What is displayed on the first line of output?____________________________________
  9. Type mkdir. What is displayed on line 1 of output? _____________________________
  10. Type mkdir --help. What is displayed on line 1 of output? ________________________
  11. Create a directory named test using the mkdir command.
  12. Use the mv command to move hello.c to directory test.
  13. Use the cd command to set the current directory to test.
  14. Type the ls -l command. What is the output ___________________________________
  15. Type gcc -c hello.c.
    Once you have fixed all compile errors, type the ls command.
    What new file did the compiler generate? _______________________________________
  16. Type gcc -S hello.c. What new file did the compiler generate? _______________________
    Type the cat command on the new file. What is line 1?_____________________________
  17. Type gcc -E hello.c. What is line 1 of the output?_____________________________
  18. Type gcc hello.c. What new file did the compiler generate? _______________________
    The new file is the executable for the program. Type its name to execute it.
    What did you type to make it execute and what is the output?______________________
  19. Use >flip.txt to redirect the output to file flip.txt. List your comman line._______________
  20. Type od -c flip.txt. List the output._____________________________________________
  21. Use the rm command to delete all files EXCEPT hello.c.
  22. Type the set command. What is the 1st directory in the search path?___________________
  23. Use cat | and sort on the command line to print the 2 lines of hello.c in int/# order.
    What command line was successful? ___________________________________
  24. Place an & at the end of the previous command line. What's the output? ________________
  25. Run Program 1 in the text. Sign&Date.__________________________________________
  26. Run the printf sample program in the text. Sign&Date.______________________________
  27. Run the formatted square/cube sample program in the text. Sign&Date._________________
  28. Run the CtoF argv Pattern sample program in the text. Sign&Date._____________________
  29. Run the assert sample program in the text. Sign&Date.______________________________
  30. Run the goto sample program in the text. Sign&Date.______________________________
  31. Run Program 5 in the text. Sign&Date.______________________________
  32. Modify the numerical integration sample program to calculate the integral from 0 to 3 of sqrt(x).
    What is the answer? ________________