填空题 下面程序的输出结果是 1
#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函数的功能是将传入的实参按倒序方式将各位数字输出。