问题
填空题
下列程序的输出结果为 【10】 。#inelude<iostream. h>int &max(int &x, int &y){return (x>y x: y); }void main() { int n=3, m=12; max(m, n)++ cout<<"m="<<m<<", n= "<<n<<end1;}
答案
参考答案:m=13,n=3
解析: 本题考察引用作为形参进行参数传递的知识。max函数的功能是返回较大的那个数,而max(m,n)++的作用是将较大值再进行增一运算。