题目内容

What is the result of this program excuted? ______ #include main(){ int i=3; switch ( i ) { case 1: i*=1; case 2: i*=2; case 3: i*=3; default : i*=4; } printf("i=%d\n",i);}

查看答案
更多问题

How many times is the loop body " k++;" executed in the following program segment? ( ) int k=0; while(k=1) k++;

A. Infinite
B. 1
C. 0
D. compile error

According to the declaration " struct stu{ int age; int num;} s, *p=&s;", which one is incorrect reference to the member "age" of variable "s"? ( )

A. s.age
B. stu.age
C. p->age
D. (*p).age

Which one is equivalent to the expression "!x" in " while(!x)"? ( )

A. x==0
B. x==1
C. x!=1
D. x!=0

What is the output of this statement "printf("%2d", 2010);"? ( )

A. 2010
B. 20
C. 10
D. compile error

答案查题题库