Software Development and Systems
As usual, it's critical that no program crashes. You'll get more credit for a program that does nothing or gives incorrect results than for one that has a syntax or logical error that causes the grading script to crash! This includes making sure that your C programs compile and run correctly on the department Solaris systems. Don't submit the executables for them; we'll compile them. And, speaking of C, figure that the exam will include problems that are strongly related to the ones on this lab.
And now, speaking of the exam, the Perl part of it will be related to the Perl programs we'll have covered in class.
Perl |
Choose three of these seven programs from Lab 2: backup, oneword, nodigits, moredips, Asiapop.awk, avgpop.awk and chem.awk, and write Perl versions of them.
#! /usr/bin/perl -wor
#! /opt/local/bin/perl -w(don't worry about which one to choose).
C |
pointersstuff) Assume the definitions
struct { char name[50]; // null-terminated char ssn[10]; // ditto int class // 1 for freshman/woman; 2 for sophomore; etc. float balance_on_bill; } student, *sptr, classlist[200];Note this is not a program, but a narrative:
lastarglength.c) This is (obviously) a C program. It returns the length of the last command-line argument. We'll call its executable lastarglength. Hence
$ lastarglength of mine The length of the last command-line argument is 4. $ lastarglength The length of the last command-line argument is 13.