题目内容

The wrong description of C language character array is ( )

A. Character arrays can hold strings
B. String in character array can be input and output as a whole
C. The whole character array can be assigned with the assignment operator "=" in the assignment statement, such as char ch[10]; ch="hello!";
D. You cannot compare strings in a character array with relational operators

查看答案
更多问题

#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 ( ).

A. 0
B. 2
C. 3
D. 5

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.

答案查题题库