[单选题]

下列程序的运行结果为

#include

template

class FF

{ TT a 1,a2,a3;

public:

F.F(TT b1,TT b2,TT b3)}al=b1;a2=b2;a3=b3;

TT Sum(){ return al+a2+a3;}

};

void main()

{ FFx(int(1,l),2,3),Y(int (4,2),5,6):

cout <<<

A.6.1 15.2

B.6 15

C.6 15.2

D.6.1 15

参考答案与解析:

相关试题

下列程序的运行结果为 #include template class FF {T

[单选题]下列程序的运行结果为 include template class FF {TTa1,a2,a3; public:下列程序的运行结果为#include<iostream.h>template<class TT>class FF{ TTa1,a2,a3;public:F.F(TT b1,TT b2,TT b3) {a1=b1;a2=b2;a3=b3;}TT Sum( ) {return a1+a2+a3;}};void main( ){ FF <int> x(int(1.1) ,2,3) ,y(i

  • 查看答案
  • 已知程序的结果为123,请填空 #include template class

    [试题]已知程序的结果为123,请填空#includetemplateclass A{public:Tx,y,z:void display(){cout <<<<void main(){al;(12)(13)(14)al.display();}

  • 查看答案
  • 下列程序的运行结果为()。#includetemplateclass FF{TT

    [单选题]下列程序的运行结果为()。includetemplateclass FF{TT a1,a2,a3;public:F下列程序的运行结果为( )。 #include<iostream.h> template<class TT> class FF {TT a1,a2,a3; public: FF(TT b1,TT b2,TT b3){a1=b1;a2=b2;a3=b3;} TT Sum(){return a1+a2+a3;}}; void main() {FF<int>x(int(1.1),2,3),

  • 查看答案
  • 下列程序的运行结果为 #include voidprint(doublea) {

    [单选题]下列程序的运行结果为#includevoid print(double a){cout<<++a;}void print(int a,int B){cout<<}void main(){print(1.2);cout<<” ”;print(3,4);}A.1.2 34B.2.2 34C.1.2 43D.2.2 43

  • 查看答案
  • 下列程序的运行结果为#includetemplateclass FF{TT a1

    [单选题]下列程序的运行结果为includetemplateclass FF{TT a1,a2,a3;public:FF(T下列程序的运行结果为 #include<iostream.h> template<class TT> class FF {TT a1,a2,a3; public: FF(TT b1,TT b2,TT b3){a1=b1;a2=b2;a3=b3;} TT Sum(){return a1+a2+a3;}}; void main() { FF<int>x(int(1.1),2,3),y(i

  • 查看答案
  • 下列程序的运行结果为()。 #include voidabc(char*str)

    [单选题]下列程序的运行结果为()。 include voidabc(char*str) {int a,b,i,j; for(i=j=0;str[i]下列程序的运行结果为( )。#include<stdio.h>voidabc(char*str){int a,b,i,j;for(i=j=0;str[i]!='/0';i++)if(str[i]!='a')str[j++]=str[j];str[j]='/0';}void main(){char Str[]="abcdef';abc(str)

  • 查看答案
  • 下列程序的运行结果为 #include void print(double a)

    [单选题]下列程序的运行结果为 include void print(double a) {cout < < £«£«a; } void pri下列程序的运行结果为#include<iostream. h>void print(double a){cout < < ++a;}void print(int a, int b){cout < < b < < a;}void main( ){print(1.2) ;tout < <" ";print(3,4) ;}A.1.2 34B.2.2 34C.1.2

  • 查看答案
  • 下列程序的运行结果为() #include main() {struc tdat

    [单选题]下列程序的运行结果为() include main() {struc tdate {int year,month,day; )today;下列程序的运行结果为( )#include<stdio.h>main(){ struc tdate{int year,month,day;)today;printf("%d/n",sizeof(struct date));}A.8B.6C.10D.12

  • 查看答案
  • 下列程序的运行结果为()。 #include voidabc(Char*str)

    [单选题]下列程序的运行结果为()。 include voidabc(Char*str) {inta,b,i,j; for(i=j=0;str[i]!下列程序的运行结果为( )。#include<stdio.h>voidabc(Char*str){ inta,b,i,j;for(i=j=0;str[i]!='/0';i++)if(str[i]!='a')str[j++]=str[i];str[j]='/0';}void main(){ char str[]="abcdef";abc(str

  • 查看答案
  • 下列程序的运行结果为 #include void main( ) { int a

    [单选题]下列程序的运行结果为 include void main( ) { int a=2; int b=a£«1; cout < < a£¯b下列程序的运行结果为#include<iostream.h>void main( ){int a=2;int b=a+1;cout < < a/b < < endl;}A.0.66667B.0C.0.7D.0.66666666…

  • 查看答案