2005 final

# 2005 final - Last Name First Name McGill ID McGill...

This preview shows pages 1–4. Sign up to view the full content.

Last Name _____________________________________ First Name _____________________________________ McGill ID ______________________________________ McGill University Computers in Engineering COMP-208 Final Examination Friday, December 16, 2005 2:00 –5:00 P. M. Examiner: Prof. N. Friedman Associate Examiner: Prof. Y. Lin Faculty calculators are allowed. This is a closed book, multiple-choice exam to be answered using the mark sense sheets for Questions 1 to 22. The multiple-choice questions may be subjected to the McGill Security Computer Monitoring program that analyzes for possible cheating. Questions 3 to 22 are worth 3% each of this exam. Questions 23 and 24 (nominally worth 20% each) are to be answered in the exam booklets provided. This exam paper and the booklet must be returned. This exam consists of XX pages. Crib sheets are NOT allowed. Grading: Question Possible Points Your Grade 1 0 2 0 3-22 3 marks each 23 20 24 20 Total 100 COMP 208 1 of 11 December 16, 2005 Final Examination Version 1

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

View Full Document
Question 1 There are multiple versions of this test. This is version 1. On the scoring sheet mark a) 1 << This is version 1 b) 2 c) 3 d) None of the above Question 2 There are two sections of this course being taught. Which section have you attended the majority of the times? a) Section 1 with Prof. Friedman in Trottier 0100 b) Section 2 with Yi Lin in Maass 10 c) None of the above Question 3 What is the output of the following FORTRAN program? PROGRAM exam IMPLICIT NONE INTEGER :: I, J, K REAL :: A, B, C A = 3.2 + 4 B = 22 / 7 C = 22.0 / 7 I = 3.7 + MOD(78,5) J = 45 / 3 * 3 + 1 – 3 * 4 K = C WRITE (*,*) I, J, K, A, B, C END PROGRAM exam a) 6 34 3 7.200 3.000 3.143 b) 7.200 3.000 3.143 6 34 3 c) 6.700 34.000 3.143 7.200 3.000 3.143 d) 6 34 3 7.200 3.143 3.143 e) None of the above. Question 4 What is the output of the following program when given the value 10 as input? PROGRAM exam IMPLICIT NONE INTEGER :: total, i, num1, num2, num3 COMP 208 2 of 11 December 16, 2005 Final Examination Version 1
READ(*,*) total num1 = 1 num2 = 1 DO i = 3, total num3 = num1 + num2 num1 = num2 num2 = num3 END DO WRITE(*,*) num3 END PROGRAM a) 21 b) 34 c) 55 d) 89 e) None of the above Question 5 What is the output of the following program when given the value 11 as input? PROGRAM exam

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

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

{[ snackBarMessage ]}

### Page1 / 11

2005 final - Last Name First Name McGill ID McGill...

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

View Full Document
Ask a homework question - tutors are online