题目内容

Let all variables have been correctly defined. To assign values 10 and 20 to variables a1 and a2, and to assign characters X and Y to variables c1 and c2, use scanf ("%d%c%d%c", &a1, &c1, &a2, &c2); statement. The correct input form shown below is ( ). (Note:□ stands for space character)

A. 10□X□20□Y
B. 10□X20□Y
C. 10□X20□Y
D. 10X20Y

查看答案
更多问题

In C, the operator that requires operands to be integers is ( )

A. /
B. ++
C. *=
D. %

ch is defined as a character type variable. The error in the following assignment statement is ( ).

A. ch=‘\’;
B. ch=62+3;
C. ch=NULL;
D. ch=‘\xaa’;

int x,y; float z;The correct assignment statement is ( )

A. x=1,y=2,
B. x=y=100
C. x++;
D. x=int (z);

There are the following procedures:int main(void) { char a,b,c,d; scanf("%c%c",&a,&b); c=getchar(); d=getchar(); printf("%c%c%c%c\n",a,b,c,d); return 0; } When executing the program, enter data as follows ( stands for carriage return, note: carriage return is also a character) 1234Then the output result is ( ).

A. 1234
B. 12
C. 123
D. 34

答案查题题库