填空题

重新定义标识符的作用域规定是外层变量被隐藏, 【8】 变量是可见的。

【参考答案】

内层
<上一题 目录 下一题>
热门 试题

填空题
阅读下面程序:#include <iostream.h>int fun( int a, int b )int c;c=a*b;return c;void main()int a=3,b=5,c=4,x=0;x=fun(fun(a, b),c);cout<<x<<end1;其运行结果是 【9】 。
填空题
以下程序的执行结果是 【11】 。#include<iostream.h>#include<stdlib.h>class Sample public: int x,y; Sample()x=y=0; Sample(int a,int b) x=a;y=b; void disp() cout<< x= <<x<< ,y= <<y<<end1; ;void main() Sample s1(2,3); s1.disp();
相关试题
  • 在下面的程序的横线处填上适当的语句,使该...
  • 【14】 允许用户为类定义一种模式,使得...
  • 请将下列类定义补充完整。class Base pub...