100%(26)26 out of 26 people found this document helpful
This preview shows page 1 - 4 out of 15 pages.
CS211 (COMPUTER ARCHITECTURE) Midterm ExamRutgers UniversityFall 2011Instructor: Abhishek BhattacharjeeTotal Time: 90 minutesName: ___________________________________________QuestionScore1/102/103/304/255/25Total/100This exam is closed-book, closed-notes.Calculators are ok. Laptops, smartphones or palmtop computers are not allowed.Show your work clearly in the spaces provided in order to get full or partial credit. Please do not be excessively verbose, it will only obfuscate your response. If you are unclear on the wording/assumptions of a problem, please state your assumptions explicitly and work it through.
1.Please provide shortanswers to the following (10 points):a)What is a Von Neumann machine? (4 points)Answer: The von Neumann machine is a conceptual design model for a digital computer that uses a central processing unit (CPU) capable of executing a certain set of instructions and a single separate storage structure (”memory”) to hold both instructions (that make up programs) and data.b)State Moore’s Law in a sentence. (3 points)Answer: The number of transistors that can be placed inexpensively on an integrated circuit doubles approximately every 18 months.c)Name two other metrics that are important to computer architects other than performance? (3 points)Answer: Power consumption; Cost
2.Pointers and C (10 points)a)Assume that the following declarations have been made:char c = ‘A’;char *p = &c;char **p2 = &p;void *v = &p2;Examine each of the following expressions. If the expression is illegal, write ILLEGAL. If the expression is legal, write its type (ie. int, void *, etc.) (5 points)•&p2: char***•*p2: char*•&v: char****•p2 + 1: char**•v: Illegalb)What does the function malloc() do? (3 points)Answer: malloc() allocates the given number of bytes in Heap and returns a pointerto the beginning of the allocated memory.