Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Compiled Languages (https://www.askmehelpdesk.com/forumdisplay.php?f=466)
-   -   Programming Questions (https://www.askmehelpdesk.com/showthread.php?t=375878)

  • Jul 13, 2009, 08:26 PM
    andyhaus1057
    Programming Questions
    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
  • Jul 13, 2009, 08:58 PM
    Perito
    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.

  • All times are GMT -7. The time now is 04:33 AM.