e2.f05 - ECE 190 Exam II Fall 2005 Tuesday, November 1st,...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 190 Exam II Fall 2005 Tuesday, November 1 st , 2005 x Be sure your exam booklet has 12 pages. x Write your name at the top of each page. x This is a closed book exam. x You may not use a calculator. x You are allowed TWO handwritten 8.5 x 11” sheets of notes. x Absolutely no interaction between students is allowed. x Show all of your work. x Be sure to clearly indicate any assumptions that you make. x More challenging questions are marked with a ***. x Don’t panic, and good luck! N o o n e c a n k n o w h o w g l a d I a m t o f i n d O n a n y s h e e t t h e l e a s t d i s p l a y o f m i n d . – Robert Frost Problem 1 20 points _______________________________ Problem 2 20 points _______________________________ Problem 3 20 points _______________________________ Problem 4 20 points _______________________________ Problem 5 20 points _______________________________ Total 100 points Name:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 2 Name: ____________________________________________ Problem 1 (20 points): Short Answer Part A (5 points): Suppose an I/O event (e.g., a keystroke) occurs infrequently, and at irregularly distributed times. Would a polled or interrupt-driven approach to processing the event be a better design choice? Give two reasons why the approach that you chose is the better one. Part B (5 points): A certain C function bar() accepts a variable number of non- negative parameters/arguments of type int . Explain two ways to design bar() so that the callee can determine the actual number of parameters passed.
Background image of page 2
Page 3 Name: ____________________________________________ Problem 1, continued Part C (5 points): What is wrong with the following function? int* sum_of_int (int x, int y) { int sum = x + y; return &sum; } Part D (5 points): Complete the output from the program fragments below. int x = 0; int i = 4; for ( i = 0; 10 > i; i++ ) { i++; x++; } printf ("x: %d\ni: %d\n", x, i); Output: x: __________ i: __________ int x = 0; int i = 4; while ( 10 > i ) { if ( 3 < x ) { break; } x++; i++; } printf ("x: %d\ni: %d\n", x, i); Output: x: __________ i: __________
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 4 Name: ____________________________________________ Problem 2 (20 points): The Assembly Process 1 . O R I G x 2 0 0 0 2 L D R 1 , C O U N T 3 N O T R 1 , R 1 4 A D
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/23/2012 for the course ECE 190 taught by Professor Hutchinson during the Spring '08 term at University of Illinois, Urbana Champaign.

Page1 / 12

e2.f05 - ECE 190 Exam II Fall 2005 Tuesday, November 1st,...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online