t2vC - if length(vec)==0 ret = 0 else temp = vec(1

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

View Full Document Right Arrow Icon
CS1371 – Test 2 Version C Solutions October 24th, 2007 CS 1371 Computing for Engineers Test 2 Version C Solutions – Fall Semester 2007 Problem 1 – Structure Arrays [50 Points] 1. varA = A. {‘Name’;’Status’;’Duty’} 2. varB = B. 1 3. varC = A. 0 4. varD = C. ’DavidSeanNathanHarold’ 5. varE = B. ’GarbageDishesFloorCounter-top’ 6. varF = C. [25 40 30] 7. varG = D. Error Problem 2 – File I/O [50 Points] 1. varA = C. 9 2. varB = A. ‘Ian’ 3. varC = A. 0 4. varD = B.10 5. varE = A. 0 6. varF = B. 1 Problem 3 – Recursion [50 Points] A. function ret = recursive_Cap(vec)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if length(vec)==0 ret = 0; else temp = vec(1); if ((temp>=65) && (temp<=90)) ret = 1 + recursive_Cap(vec(2:end)); else ret = recursive_Cap(vec(2:end)); end end B. E. None of the above A. ret = 0.1 B. ret = 200 C. -Needs to have a terminating condition -Needs to move towards termination -Need to have a call to a clone of the function CS1371 Test 2 Version C Solutions October 24th, 2007 Problem 4 Plotting [50 Points] A. 1. A, B 2. C, D 3. E 4. A, D 5. A, D 6. A, B, C, D 7. E B. 1. False 2. True 3. False 4. True 5. False...
View Full Document

This note was uploaded on 05/08/2010 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.

Page1 / 2

t2vC - if length(vec)==0 ret = 0 else temp = vec(1

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

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