【简答题】下列程序的输出结果是【 】。 include using namespace std; class Base{ int x; public: Base(int b):x(b){} virtual void display(){cout$amp; }; class Derired:public Base{ int y; public: Derived(int d):Base(d),y(d){} vo...
【简答题】下列程序的输出结果是【 】 include<iOStream> using namespace std; template <typename T> T total (T*datA) { T s=0; while(*datA) { s+=*data++; } return s; } int main() { int x[]={2,4,6,8,0,12,14,16,18}; cout<<total(...
【简答题】下列程序的输出结果是【 】。 include using namespace std; class Base{ public: int m,n; Base(int i,int j):m(i),n(j){} }; class Derived:public Base{ public: int m,k,; Derived(int i,int j):Base(i,j),m(i+1),k(j+1){} };...
【单选题】下列程序的输出结果是 #include' iostream' using namespace std; int Max(int a,int b) { if(a > b) else return a; else retum b; } void main( ) { int m,n; m=10,n=5; int max=Max(m,n); cout < < max < < end
【单选题】下列程序的输出结果是 using System; class Program { public static void Main(string[] args) { int x=1,a=0,b=0; switch(x) { case 0: b++; break; case 1: a++; break; case 2: a++; b++; break; } Console.WriteLine(“a={...