我正在与Cea一起学习软件系统开发A-Level。代码显示在下面。标记方案说伪码是错误的,有人能解释为什么吗?这个伪代码如何是假的(不输出43)
伪代码:
The output from the following pseudo code is 43.
(method) – void incrementNum(int numParam){
numParam++
}
(main method) – void main(){
int numArg = 42
incrementNum(numArg)
output numArg // writes 43
}
请把代码放到你的问题,链接的图像可能会丢失,并没有为其他人编制索引。除此之外,如果你至少在回答问题的人的问题上付出至少的努力,那将是非常棒的。 –
[请不要将您的代码发布为图片。](// meta.stackoverflow.com/q/285551) –