fin06w - Last Name _ First Name _ McGill ID _ 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-208 Final Examination Monday, April 24, 2006 2:00 –5:00 P. M. Examiner: Prof. N. Friedman Associate Examiner: Prof. C. Verbrugge This is a closed book, multiple-choice exam to be answered using the mark sense sheets for Questions 1 to 25. The multiple-choice questions may be subjected to the McGill Security Computer Monitoring program that analyzes for possible cheating. Questions 1 to 10 are worth 1% each, questions 11 to 20 are worth 3% each and questions 21-25 are worth 4% each. Questions 26 and 27 (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 11 pages. Faculty standard calculators are allowed. Crib sheets are NOT allowed. Grading: Question Possible Points Your Grade 1-10 1 mark each 11-20 3 marks each 21-25 4 marks each 26 20 27 20 Total 100 COMP 208 1 of 11 April 24, 2006 Final Examination 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 The variable names count and COUNT are a) Equivalent in FORTRAN but not in C b) Equivalent in C but not in FORTRAN c) Equivalent in C and FORTRAN d) Not equivalent in C or in FORTRAN Question 2 In C if the variable P is declared to be a pointer to a particular datatype then: a) *P dereferences that pointer, thus returning the value at the address pointed to by P. b) &P dereferences that pointer, thus returning the value at the address pointed to by P. c) None of the above Question 3 Comments are used in a programming language to help the compiler produce code that runs faster. a) True b) False c) True only for C but not for FORTRAN d) True only for FORTRAN but not for C e) None of the above Question 4 Data values can be transmitted to a FORTRAN subroutine using a) The local variables of the subroutine b) Arguments c) Return values d) All of the above e) None of the above Question 5 A binary search algorithm can be used to successfully find the location of a value that is stored in any array. a) True b) False Question 6 If a binary search of an array A between left and right terminates with left>right a) No action is taken b) The value we are searching for is at A[mid] c) The value we are searching for is not in the array d) An error has occurred e) None of the above COMP 208 2 of 11 April 24, 2006 Final Examination Version 1
Background image of page 2
Question 7 The two initial values passed to the secant algorithm for root finding do not have to bracket the root. a)
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.

This note was uploaded on 01/15/2010 for the course COMP COMP 206 taught by Professor Vybihal during the Spring '04 term at McGill.

Page1 / 11

fin06w - Last Name _ First Name _ McGill ID _ 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