1. [单选题]下列程序的输出结果是______。main(){ float x=2.0,y; if(x0.0)y=0.0; else if(x10.0)y=1.0/x; else y=1.0; printf("%f\n",y);}
B. 0.25
C. 0.5
D. 1
2. [单选题]若i的初值为8,则下列循环语句的循环次数为( ) 次。
A. i=i+2
B. Loop
C. 3次
D. 4次
E. 5次
F. 6次
3. [单选题]下列表达式中不符合Visual FoxPro 6.0语法要求的是( )。
A. 5Y>15
B. L+1
C. 2345
D. 07/27/12
4. [单选题]设有如下程序: Private Sub Command1_Click() Dim C As Integer, d As Integer c=4 d=InputBox("请输入一个整数") Do While d>0 If d>c Then c=c+1 End If d=InputBox("请输入一个整数") Loop Print c+d End Sub 程序运行后,单击命令按钮,如果在输入对话框中依次输入1、2、3、4、5、6、7、8、9、0,则输出结果是______。
A. 12
B. 11
C. 10
D. 9
5. [单选题]对长度为n的线性表进行顺序查找,在最坏情况下所需要的比较次数为
A. log2n
B. n/2
C. n
D. n+l