单项选择题

下列程序的运行结果为( )。
#include<iostream.h>
void main()
int a=2;
int b=a+1;
cout<<a/b<<endl;

A.0.66667
B.0
C.0.7
D.0.66666666
<上一题 目录 下一题>
热门 试题

单项选择题
类模板template<class T>class x...,其中友元函数f对特定类型T(如int),使函数f(x<int>)成为x<int>模板类的友元,则其说明为( )。
A.friend voidf();
B.friend voidf(x<T>);
C.friend voidA::f();
D.friend void C<T>::f(x<T>);
单项选择题
下列是重载为非成员函数的运算符函数原型,其中错误的是( )。
A.Fraction operator+(Fraction,Fraction);
B.Fraction operator-(Praction);
C.Fraction& operator=(Fraction&,Fraction);
D.Fraction& operator+=(Fraction&,Fraction);
相关试题
  • 有如下程序: #include <iostream> u...
  • 如下类定义中包含了构造函数和拷贝构造函数...
  • 在MyClass类的定义中,对赋值运算符;进行...
  • 在下列的程序的横线处填上适当的语句,使该...
  • 下列程序的输出结果为2,请将程序补充完整...