填空题

在类中定义和实现的函数可以称为 【9】 。

【参考答案】

内联函数
<上一题 目录 下一题>
热门 试题

填空题
下面程序的预设功能是:将文本文件readme 中的内容读出,显示在屏幕上。 #include <fstream> using namespace std; int main () char buf[ 80 ]; ifstream file( readme ); while (_______________) file.getline( buf, 80 ); cout<<buf<<end1; me. close(); 则程序中空白处应填入的语句为 【15】 。
填空题
若有以下程序: #include <iostream> using namespace std; class sample int x; public: sample() void setx(int i) x=i; friend iht fun(sample B[],int n) int m=0; forint i=0;i<n;i++) if(B[i].x>m) m=B[i].x; return.m; ; int main ( ) sample A[10]; int arr[]=90,87,42,78,97,84,60,55,78,65; for(int i=O;i<10;i++) A[i].setx(arr[i]); cout<<fun(A, 10)<<end1; return 0; 该程序运行后的输出结果是 【13】 。
相关试题
  • 下列关于常数据成员的描述中,错误的是()。
  • 若按层次顺序将一棵有n个节点的完全二叉树...
  • 应在下列程序画线处填入的正确语句是 ( ...
  • 若有以下程序: #include <iostream>...
  • 有以下程序: #include <iostream> u...