eecs280f13_MidtermExam

Circleallthatapplyifany ac n t i t p 5 osn bc n t

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ove, which of the following return functions would make this tail­recursive? Circle all that apply, if any. a) r t r n x 3 ) eunf(+,y; b) r t r n f ( , y , x y ; eunf(nx ) +) c) r t r n x ) eunf(,y; d) r t r n x ) + f ( + , y ; eunf(,y nxy ) e) r t r n x y ) eun1+f(+,y; 1E) (4 Points) Fill in the values of the array at each point: ita]={,2 ,4; n [ 1 ,3 } it a2; n*p=& it ; n*r=a *+ p+7 r+=* ; * ; r=9 * r­1 p=* ; *r2 ; (+)=7 EECS 280 Fall 2013 4/19 uniqname: _________________________ 1F) (2 Points) Which of the following code fragments would always cause a compiler error? (Circle all that apply, if any.) a) c n t i t * p = 5 os n ; b) c n t i t * p os n ; * ; p=5 c) c n t i t * c n t p os n os ; * ; p=5 d) i t * p n ; * ; p=5 e) i t * c n t p n os ; * ; p=5 1G) (2 Points) You are given a file called n m e s which contains the following: ubr, 3212 Which w i eloop would we replace the comment with in the following code to produce the hl output "8"? (Circle all that apply, if any.) itnm=0 u ; n u ,sm=0 isra h ftemf; f.pn"ubr"; hoe(nmes) /wielo oshr /hl opge ee cu <sm< nl ot< u <ed; a) w i e f ) { hl(h f >nm h> u; sm+ u; u =nm } c) w i e f &l...
View Full Document

This test prep was uploaded on 03/10/2014 for the course EECS 280 taught by Professor Noble during the Winter '08 term at University of Michigan.

Ask a homework question - tutors are online