2005%20Winter%20Midterm

2005%20Winter%20Midterm - Last Name _ First Name _ McGill...

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

View Full Document Right Arrow Icon
Last Name _____________________________________ First Name _____________________________________ McGill ID ______________________________________ McGill University Computers in Engineering COMP-208B Mid-Term Examination Tuesday February 15, 2005 2:35 – 4:00 P. M. Faculty calculators allowed. All programs below have been tested and run without errors. Grading: Question Time Possible Points Your Grade 1 1 0 2 1 0 3 2 3 4 3 4 5 3 5 6 5 6 7 5 6 8 5 6 9 6 6 10 3 6 11 4 5 12 7 6 13 5 6 14 5 6 15 30 35 Total 85 100 Computers in Engineering 1 of 9 February 15, 2005 Mid term test Version 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
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. 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. Ratzer in Burnside 1B45 B. Section 2 with O. Giroux in Trottier 0100 C. None of the above Question 3 What is the purpose of the stars in WRITE(*,*) ? A. That's the only correct syntax B. First: Formatting, Second: Line selection C. First: File I/O, Second Line selection D. First: File I/O, Second Formatting E. None of the above Question 4 PROGRAM P4 IMPLICIT NONE INTEGER :: I ,K K=1 DO I = 12, 0, -1 WRITE (*,*) “Inside DO loop” K = K +1 END DO END PROGRAM P4 How many times will the above program print “Inside DO loop”? A. 0 B. 1 C. 12 D. 13 E. None of the above Computers in Engineering 2 of 9 February 15, 2005 Mid term test Version 1
Background image of page 2
Question 5 What does this program output? INTEGER A, B, C REAL D, E, G A = 27./2 B = MOD(27,7) C = 27/2**2 D = 5*(19/3) E = 1+21/(4.5-2.5) F = A PRINT *, A, B, C, D, E, F STOP END A. 13 6 6 30. 11.5 13. B. 13.5 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

2005%20Winter%20Midterm - Last Name _ First Name _ McGill...

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

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