NOIP2015 阅读程序
4.
#include <iostream> using namespace std; void fun(char *a, char *b) { a = b; (*a)++; } int main() { char cl, c2, *p1, *p2; cl = 'A'; c2 = 'a'; p1 = &cl; p2 = &c2; fun(p1, p2); cout << cl << c2 << endl; return 0; }
输出:
发表评论