Assignment 1, due Jan. 28
Part of
the homework for 22C:112, Spring 2011
|
On every assignment, write your name legibly as it appears on your University ID and on the class list! Assignments are due at the start of class on the day indicated (usually Friday). Exceptions will be by advance arrangement unless there is what insurance companies call "an act of God" (something outside your control). Homework must be turned in on paper, either in class or in the teaching assistant's mailbox. Never push late work under someone's door!
Microsoft's first product was a BASIC interpreter for the Altair computer, based on the 8-bit Intel 8080 microprocessor. This BASIC was interpreted. That is, BASIC programs were executed by a program that read and interpreted the source code directly, without first translating to machine code. Altair BASIC had a pair of commands, PEEK and POKE. These allowed a program to peek at the value in a RAM address or poke a new value into an address.
A Question: Explain the role of PEEK and POKE in the transparency or opacity of the virtual machine interface provided by Altair BASIC. (0.5 points)
a) What organizations did Bell Labs partner with to develop the
Multics operating system?
b) What was the application program from which the first version
of Unix grew?
c) What was the first high-level language used to implement
parts of Unix?
d) How did the University of California at Berkely get involved?
e) Who owns Unix today?
#include <stdio.h> int fib(int i){if(i <= 1){return i;}else return fib(i-1)+fib(i -2);}int main(){int i; for( i=0 ;i<= 10;i ++){ printf("fib(%d)=%d\n",i, fib(i));}}
a) Fix it to conform with the recommended style. Running the result is a good way to make sure you didn't break it, but grading will depend on style as well as correctness. (1.0 points)
c) Would rewriting this program to take advantage of the object-oriented features Java or C# make it any clearer? (0.5 points)