以下各语言书写的代码可认为其功能是相同的。对于该代码 哪项判断是正确的? C/C++: #include <

大学网课 已帮助 人

以下各语言书写的代码可认为其功能是相同的。对于该代码,哪项判断是正确的? C/C++: #include <stdio.h> int hehe(){ printf("hehe"); hehe(); return 0; } int main(){ hehe(); return 0; } Java语言: public class Main{ public static int hehe() { System.out.println("hehe"); hehe(); return 0; } public static void main(String args[]) { hehe(); } } Python语言: def hehe(): print("hehe") hehe() return 0 hehe()

A.代码有错,无法运行。

B.代码可以运行,并在有限次函数调用后结束。

C.代码可以运行,将产生无限次函数递归调用(不考虑机器出故障、停电等意外因素)。

D.以上都不对。

以下各语言书写的代码可认为其功能是相同的。对于该代码 哪项判断是正确的? C/C++: #include &lt;

热搜:关于c语言程序书写规则说法中正确的是