阅读程序。阅读下列C++程序(共2个文件)。阅读后请说明程...
阅读程序。阅读下列C++程序(共2个文件)。阅读后请说明程序的功能,并对每条语句进行注释,说明其作用。添加注释并提交源程序(请粘贴源代码或屏幕截图,不要上传附件)。 // 程序文件:1.cpp #include <iostream> using namespace std; void fun(int x) { if (x < 0) { cout << ‘-‘; x = -x; } while (x != 0) { cout << x%10; x /= 10; } cout << endl; } void fun(char *str) { int N = 0; while (str[N] != ‘\0’) N++; for (int n = N-1; n >= 0; n--) cout << str[n]; cout << endl; } // 程序文件:2.cpp #include <iostream> using namespace std; extern void fun(int x); extern void fun(char *str); int main() { fun(-2015 ); fun(“-2015” ); return 0; }