单项选择题

下列程序的运行结果为( )。
#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
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序段中有错的是( )。
A.template <Class Type>
B.Type
C.func(Typea,b)
D.return(a>b)(a):(b);
单项选择题
若类A和类B的定义如下: class A int i,j; public: int geti() return i; ; class B:public A int k; public: void make() k=i*j; ; 则上述定义中非法的表达式是( )。
A.k=i*j
B.int k;
C.return i;
D.void make()
相关试题
  • 下面程序的功能是:将字符数组a中下标值为...
  • 当循环队列非空且队尾指针等于队头指针时,...
  • 将x+y*z中的“+”用成员函数重载,“*...
  • 以下程序的执行结果是______。 #in...
  • 下列程序的输出结果是______。 #in...