Assignment 1, due Jan. 26
Part of
the homework for 22C:112, Spring 2009
|
Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated (usually a Friday). The only exceptions to this rule 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 and in class! Late work may be turned in to the teaching assistant's mailbox, but see the late work policy. Never push late work under someone's door!
Question: The transparency of the macro extension language of Microsoft Excel was quite deliberate. Why would a word user want access to the full power of Visual Basic from within a Excel spreadsheet? (0.5 points)
a) What was the name of the timesharing system that was the predecessor of Multics at MIT?
b) Why did Bell Labs quit the Multics project?
c) What came of the effort to port Multics to the Intel x86 family?
d) What was the last Multics site?
e) How is Multics related to the modern idea of an ISP?
#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=1;i<= 10;i++){printf("fib(%d)=%d\n",i,fib(i));}}
a) Fix it so it conforms to the recommended style. (0.5 points)
b) It needs a main program to test it. Write a C main program that calls fib(i) for values of i from 1 to 10. Include this main program with your improved answer to part a. You need not run it, but of course, running it is a good way to make sure your code is correct. Grading, however, depends on more than correctness. Your code should conform to the style required. (0.5 points)
c) It's not object oriented. Comment on the value, in terms of clarity and readability, of the changes you would have to make to this code to make it into legal Java or C#. (0.5 points)