【单选题】【消耗次数:1】
以下非法的赋值语句是()
n=(i=2,i);
j;
(i1);
x=j>0;
参考答案:
复制
纠错
相关题目
【单选题】 设语句x++的时间是单位时间,则以下语句的时间复杂度为( )。 for(i=1; i<=n; i++) for(j=i; j<=n; j++) x++;
①  O(1)
②  O(n的平方)
③  O(n)
④  O(n的立方)
【单选题】 以下程序的输出结果是()。 main( ) { int b[3][3]={0,1,2,0,1,2,0,1,2},i,j,t=0; for(i=0;i for(j=i;j t=t+b[i][b[j][j]]; printf(%d\n,t); }
①  3
②  4
③  1
④  9
【单选题】 在下面循环语句中内层循环体S语句的执行次数为( )。 for(int i=0;i<n;i++) for(int j=i;j<n;j++)S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为()。 for(int i=0; i<n; i++) for(int j=i; j<n; j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为( ) for(int i=0; i<n; i++) for(int j=i; j<n; j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 以下循环体的执行次数是#include stdio.hvoid main(){ int i,j; for(i=0,j=1; i i=i+2) j--; }
①  3
②  2
③  1
④  0
【单选题】 以下程序段的运行结果是()。inta[]={1,2,3,4},i,j;j=1;for(i=3;ii--){a[i]=a[i]*j;j=j*3;}for(i=0;ii++)printf("%d",a[i]);
①  36912
②  181294
③  271894
④  541894
【单选题】 以下程序段运行后s的值是()。 int a[3][3]={1, 2, 3, 4, 5, 1, 2, 3, 4} ; int i, j, s=1; for(i=0; i for(j=i+1; j s+=a[i][j];
①  6
②  120
③  7
④  240
【单选题】 若有说明:int i,j =7,*p =&i,*q=&j;则与i =j;不等价的语句是()。
①  p =q
②  *p =*q
③  *i =*q
④  *p =*j
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为( ) for(int i=0; i i++) for(int j=i; j j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为()。 for(int i=0; i i++) for(int j=i; j j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
随机题目
【多选题】 _____________ forget her smile.
①  Never shall I
②  Never I shall
③  I never shall
④  I shall never
【多选题】 My ______________ is that we should consider the idea.
①  question
②  suspicion
③  suggestion
④  proposal
【多选题】 Computers are __________ more efficient than human beings.
①  many
②  much
③  less
④  far
【多选题】 The prisoners (囚犯) have_____________ .
①  run out of
②  kept away
③  run away
④  escaped
【多选题】 _____________ its very hot in the summer, the other seasons are beautiful.
①  Even though
②  Even if
③  Although
④  Though
【多选题】 _____________ , the meeting was closed.
①  Nobody having any more to say
②  Nobody have any more to say
③  Since nobody had any more to say
④  Since nobody having any more to say
【单选题】 That hotel ____________ good meals.
①  provides
②  contributes
③  increases
④  specifies
【单选题】 The plants died for____________ water.
①  lack of
②  in spite of
③  out of
④  despite of
【单选题】 The snowstorm _____________ us three hours because we had to drive very slowly.
①  decided
②  deepened
③  delayed
④  detailed
【单选题】 The travellers have suffered many hardships and ____________ many difficulties.
①  undergo
②  undergoes
③  undergone
④  underwent