The following statements or statement groups that do not form an infinite loop are ( )
A. n=0; do{++n;} while(n<=0);
B. n=0; while(1) {n++;}
C. n=10; while(n);{n--;}
D. for(n=0,i=1; i++) n+=1;
查看答案
In the following expressions, the expression that is not equivalent to "(E)" in while (E) is ()
A. (!E=0)
B. (E>0 || E<0)
C. (E==0)
D. (E!=0)
The output of the following program is ______ int main (void) { int n=12345,d; while(n!=0) { d=n%10; printf("%d",d); n/=10; } return 0; }
There are the following programs, if you input 18,11from the keyboard at run time, the output of the program will be ______ . int main (void) { int a,b; printf("Enter a,b:"); scanf("%d,%d",&a,&b); while(a!=b) { while(a>b) a-=b; while(b>a) b-=a; } printf("%d,%d\n",a,b); return 0; }
Of the following function calls, the incorrect is ( ).
A. max(a,b);
B. max(3,a+b);
C. max(3,6);
D. max(3,6);