问题
填空题
下面程序的输出结果是〈u〉 【9】〈/u〉。
#include 〈iostream〉
using namespace std;
void f(int x)
if(x)
cout.put(’0’+x%10);
f(x/10);
int main()
f(11001);
return 0;
答案
参考答案:10011
解析: 本程序中f函数的功能是将传入的实参按倒序方式将各位数字输出。