082267_lesson5

082267_lesson5 - variables value and list after each of the...

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

View Full Document Right Arrow Icon
CS 367 Programming Languages Lesson 5 Problem Set Questions Chapter 9 2. In most Fortran IV implementations, parameters were passed by reference, using access path transmission only. State both the advantages and disadvantages of this design choice. Access path transmission is advantageous because it cuts down on overhead and CPU cycles since the only thing copied is the reference. The disadvantage is that it is unsafe for one way communication and accessing the parameter takes more time because of indirection. 5. For each of the following parameter-passing methods, what are the values of the
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: variables value and list after each of the three calls to swap? a. Passed by value Value = 1 List[0] = 2 List[1] = 3 List[2] = 5 List[3] = 7 List[4] = 9 b. Passed by reference Value = 1 List = 0013FF44 c. Passed by value-result Value = 2 List[0] = 3 List[1] = 1 List[2] = 5 List[3] = 7 List[4] = 9 7. For each of the following parameter-passing methods, what are the values of the list array after execution? a. Passed by value list[0] = 1 list[1] = 3 b. Passed by reference list = 0013FF5C c. Passed by value-result list[0] = 2 list[1] = 6...
View Full Document

This note was uploaded on 01/19/2011 for the course CS 367 taught by Professor Unkown during the Spring '09 term at Grantham.

Page1 / 2

082267_lesson5 - variables value and list after each of the...

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