CSCI 151 Introduction to Computer Science,

Assignment 1 Instructions

  • Create a directory CSCI151 under your home directory (if you didn't do it yet in the Lab) to create a directory do as follows
    mkdir CSCI151
  • Create a directory Assign1 under your CSCI151 directory: while you are in your home directory, do the following:
    cd CSC151
    mkdir Assign1
  • Create a separate file (source file) for each program that you have in Assignment 1 - you will have 4 programs,
    you can call your files prog1.c, prog2.c, ...
    or you can choose some other names according to your choice.
    I will assume that the programs are called prog1.c, prog2.c, ...
  • Before you submit your assignment, compile and run each program and
    make sure that the program doesn't have any compilation errors and doesn't have any logical errors,
    and the program produces the right result.
  • To compile the first program do the following:
    gcc -o prog1 prog1.c
  • This command will create an executable file prog1 for your first program
  • You can run the executable file as follows:
       prog1
  • Compile and Run all 4 programs before you go to the submission step.
  • Important: the program that doesn't compile will receive 0 points

Submission of the Assignment 1

  • You will submit the printout of the source file for each program and you will send the source file for each program by e-mail to yanako@cs.widener.edu
  • To print the source file for each program, type the following at the LINUX prompt:

      lpr -Pnetlaser prog1.c or print prog1.c
      lpr -Pnetlaser prog2.c or print prog2.c
      lpr -Pnetlaser prog3.c or print prog3.c
      lpr -Pnetlaser prog4.c or print prog4.c
  • To send the source files for each program by e-mail use pine and attach all programs to ONE e-mail. I have to receive only ONE e-mail with ALL 4 programs. We will have practice with pine during the lab.