#includemain() { char s[]={"012xy"}; int i,n=0; for(i=0;s[i]!=0;i++) if(s[i]>='a'&&s[i]<='z') n++; printf("%d\n",n); }The output of the program is ( ).
查看答案
The following statement is correct ( )
A. The input can be a real constant, such as scanf(”%f”,3.5);
B. Only format control, no input item, can also input correctly, such as scanf(”a=%d,b=5d”);
C. When inputting a real data, the format control part should specify the number of decimal places, such as, scanf ("% 4.2f", &f);
D. When entering data, you must indicate the address of the variable, such as, scanf(”%f”,&f);
The subscript when defining an array can be an integer constant or an integer expression.
When defining a one-dimensional array, only some elements can be given initial values.
If there is a definition statement: int m[] = {5,4,3,2,1}, i = 4;the error in the following reference to the m array element is ( ).
A. m[--i]
B. m[2*2]
C. m[m[0]]
D. m[m[i]]