Skip to content
ExamSpine

Lesson 4.4 · Answer it

Param vs arg

2 marksYou mark it yourself against the marking points

Here is a function and a call to it.

def area(width, height):
    return width * height

result = area(5, 3)
static int area(int width, int height) {
    return width * height;
}

// in main:
int result = area(5, 3);

(a) State which names are parameters and which values are arguments. [1]

(b) State what would happen if the function printed width * height instead of returning it, and result was used later. [1]

[2]