Question

    What is the scope of a parameter in a function?

    A It is local to the function and can only be accessed within the function. Correct Answer Incorrect Answer
    B It is global and can be accessed from any part of the program. Correct Answer Incorrect Answer
    C It is local to the function but can be accessed from other functions. Correct Answer Incorrect Answer
    D It is local to the function but can be accessed from other methods within the same class. Correct Answer Incorrect Answer

    Solution

    It is local to the function and can only be accessed within the function.

    Practice Next

    Relevant for Exams:

    ×
    ×