PDA

View Full Version : Programming Questions


andyhaus1057
Jul 13, 2009, 08:26 PM
Hi,

I'm not sure about these, but these are my answers. Can you please check them for me?

1) When __, a copy of the argument's value is passed into the parameter variable.
B?

A) passing an argument by reference
B) passing an argument by name
C) passing an argument by value
D) passing an argument by data type


2) When __, the module can modify the argument in the calling part of the program
C?

A) passing an argument by reference
B) passing an argument by name
C) passing an argument by value
D) passing an argument by data type


3) When possible, you should avoid using __ variables in a program
B?

A) local
B) global
C) reference
D) parameter

Perito
Jul 13, 2009, 08:58 PM
1) When __, a copy of the argument's value is passed into the parameter variable.
B?

A) passing an argument by reference
B) passing an argument by name
-> C) passing an argument by value
D) passing an argument by data type

If you pass it by value, you pass a copy of the variable.

2) When __, the module can modify the argument in the calling part of the program
C?

->A) passing an argument by reference
B) passing an argument by name
C) passing an argument by value
D) passing an argument by data type

When you pass an argument by reference, the subroutine can modify the value in the calling routine.

Passing by name or passing by data type are "smoke screens".


3) When possible, you should avoid using __ variables in a program
B?

A) local
->B) global
C) reference
D) parameter

My selections are shown by the arrows.

This should be under "Programming" somewhere.