CS1371_Fall_2008_Test1_VerM_Solutions

CS1371_Fall_2008_Test1_VerM_Solutions - --- 30pts total 1....

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

View Full Document Right Arrow Icon
Version M1 Multiple Choice --- 30 pts total 1. B 2. E 3. B 4. D 5. D 6. A 7. C 8. A 9. A 10. D Tracing --- 18 pts total 11. B 12. 2 13. 3 14. 15 15. 3 16. 3 Design Problem-- - 22 pts total 17. 3 18. char char double 19. 1 20. double 21. Generate a GTID based on student info. 22. function id = GTID(first,last,bday) 23. 2017 24. 1514
Background image of page 1

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

View Full DocumentRight Arrow Icon
Version M2 Multiple Choice --- 30pts total 1. A 2. D 3. E 4. B 5. A 6. C 7. A 8. E 9. A 10. D Tracing --- 18pts total 11. A 12. 2 13. 3 14. 15 15. 3 16. 3 Design Problem --- 22pts total 17. 1 18. double 19. 3 20. char char double 21. function id = GTID(first,last,bday) 22. Generate a GTID based on student info. 23. 1514 24. 2017
Background image of page 2
Version M3 Multiple Choice --- 30 pts total 1. C 2. E 3. D 4. B 5. E 6. A 7. C 8. C 9. E 10. D Tracing --- 18pts total 11. D 12. 3 13. 2 14. 15 15. 3 16. 0 Design Problem --- 22pts total 17. 1 18. 3 19. char char double 20. double 21. function id = GTID(first,last,bday) 22. Generate a GTID based on student info. 23. 2017
Background image of page 3

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

View Full DocumentRight Arrow Icon
24. 1514Version M4 Multiple Choice
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: --- 30pts total 1. E 2. C 3. B 4. B 5. D 6. B 7. E 8. C 9. B 10. B Tracing--- 18pts total 11. C 12. 3 13. 2 14. 15 15. 3 16. 3 Design Problem--- 22pts total 17. 1 18. 3 19. double 20. char char double 21. function id = GTID(first,last,bday) 22. Generate a GTID based on student info. 23. 1514 24. 2017 CODING A Suggested Solution: function [x,y,z] = countChar(ca) x = 0; y = 0; z = 0; for index = 1:length(ca) if ischar(ca{index}) if length(ca{index}) > 7 x = x + 1; elseif length(ca{index}) < 7 y = y + 1; end z = z + length(ca{index}); end end B function avg_bsc = calcBSC(ca) bsc = ; for index = 1:length(ca) if ca{index}(1) <= 1 && ca{index}(1) >= .1 newbsc = ca{index}(2) / (ca{index}(1) * ca{index}(3)); bsc = [bsc newbsc]; end end avg_bsc = mean(bsc);...
View Full Document

This note was uploaded on 11/08/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.

Page1 / 5

CS1371_Fall_2008_Test1_VerM_Solutions - --- 30pts total 1....

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