eecs280f13_MidtermExam

Writeyouranswerinthebox itsztln000 niesre cusz otie

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: 1: Short Answer (19 points) Use the following definition of s r e ( for question 1A: tln) itsre(cntca*cntsr n tln os hr os t) { cntca*p=sr os hr t; wie p! \’) hl(* =‘0 { p+ +; } rtr t; eunp­sr }/sre / tln 1A) (1 Point) Given the definition of s r e ( above… tln) What is the value printed out by the following code? Write your answer in the box. itsz tln"000) n ie=sre(\\\"; cu <sz; ot< ie 1B) (1 Point) Assuming a single c a occupies a single spot in memory, how many spots in hr memory are allocated to store the following C­string? Write your answer in the box. "rw de" 1C) (3 Points) What does the following code print out? Write your answer in the box. ita]={2 4 5 7 9; n [ 1,3,4,6,8} cntitsz ; os n ie=5 fr(n*p=a1 p<a+sz; +) o it +; ie p+ { * (­) p=*p1; } fr(n ; ie i+ o iti=0 i<sz; +) { cu <ai <"" ot< < ; } EECS 280 Fall 2013 3/19 uniqname: _________________________ 1D) (2 Points) Consider the following function: itf(n ,dul ){ n nitx obey i x>3)rtr ; f( 0 eunx +x +; / eunsaeet /rtr ttmn } If we replaced the commented line "return statement" ab...
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