以下选项中表示空函数的是( )。

admin2022-04-01  14

问题 以下选项中表示空函数的是(          )。

选项 A、int fun(){return 0;}
B、int fun();
C、int fun(){}
D、int fun(int a,int B{return 1;}

答案C

解析 空函数是函数体没有执行语句的函数,选项A、D不是空函数;选项B是函数的声明,只有选项C是空函数,本题答案为C。
转载请注明原文地址:https://kaotiyun.com/show/U6kp777K
0

最新回复(0)