【单选题】以下程序运行结果为()。
A. $A[0] = Hello $A[1] = Hello $A[2] = $A[3] = $A[4] = B. $A[0] = Hello $A[1] = Hello $A[2] = Hello $A[3] = $A[4] = C. $A[0] = $A[1] = $A[2] = $A[3] = $A[4] = D. 程序运行提示错误
A. $A[0] = Hello $A[1] = Hello $A[2] = $A[3] = $A[4] = B. $A[0] = Hello $A[1] = Hello $A[2] = Hello $A[3] = $A[4] = C. $A[0] = $A[1] = $A[2] = $A[3] = $A[4] = D. 程序运行提示错误
举一反三
- <?php $A=array_fill(-5,3,"Hello"); for ($i=0; $i<5; $i++){ echo "\$A[$i] = ".$A[$i]." "; } ?>以下程序运行结果为( )。 A: $A[0] = Hello $A[1] = Hello $A[2] = $A[3] = $A[4] = B: $A[0] = Hello $A[1] = Hello $A[2] = Hello $A[3] = $A[4] = C: $A[0] = $A[1] = $A[2] = $A[3] = $A[4] = D: 程序运行提示错误
- 以下程序运行结果为()。 A: $A[0]=Hello$A[1]=Hello$A[2]=$A[3]=$A[4]= B: $A[0]=Hello$A[1]=Hello$A[2]=Hello$A[3]= $A[4]= C: $A[0]=$A[1]=$A[2]= $A[3]= $A[4]= D: 程序运行提示错误
- 下面程序循环次数为: s='hello' i=0 whileiprint(s[i],end=',') i+=1[/i] A: 3 B: 4 C: 5 D: 6
- 下列语句或语句序列中有语法错误的是_____。 A: int i,j; for( i=0, j=0; i<5; i++, j--)cout<<"Hello World!"; B: for(10)cout<<"Hello World!"; C: int i; for( i=0; i<5; i+=2) cout<<"Hello World!"; D: int i=0; for( ; i<5; i++) cout<<"Hello World!";
- 下列语句或语句序列中有语法错误的是_____。 A: int i,j; for( i=0, j=0; i<5; i++, j--)cout<<"Hello World!"; B: for(10)cout<<"Hello World!"; C: int i; for( i=0; i<5; i+=2) cout<<"Hello World!"; D: int i=0; for( ; i<5; i++) cout<<"Hello World!";