c语言1(1 c)
c语言1(1 c)
Single selection (2 points per question)
"1" Set the value of "a" for the character variable ch, the value of the integer variable m is ' 1 ', assuming execution Putchar (m); Putchar (' '); Putchar (ch); then the output is.
A, A1
B, LA
C, AL
D, 1A
Standard Answer: D
"2" has the following function call statement
FUC (REC1, REC2, (REC4, rec5));
The number of arguments contained in the function invocation statement is.
A, 3
B, 4
C, 5
D, grammatical errors
Standard answer: A
"3" has the following function definitions:
void Fun (int n, double x) {}
If the variables in the following options have been correctly defined and assigned, then the proper invocation of the function fun is.
A, fun (int y, double m);
B, Kofun (10, 12.5);
C, Fun (x, n);
D, void Fun (n, x);
Standard Answer: C
"5" has the following program fragment, the output of the execution is
int I 010, Ji 10, Ke 0 Xl0; print f ("%d,%d,%d", K, J, I);
A, 16, 10, 8
B, 81016
C, 10, 10, 10
D, 8, 10, 16
Standard answer: A
"9" has the following procedural sections:
Char Str 14 "iam"};
strcat (str, "sad!");
scanf ("%s", str);
Print f ("%s", str);
When the input is happy! , the result of the output is ().
A, Iamsad!
B, happy!
C, Iamhappy!
D, happy!
Standard Answer: b
"11" in the following if statement is correctly formatted
A, if (A Bu) Bp +;
B, if (A Bu) {B; print f ("%d", b);}
else {+; print f ("%d", a);}
C, if (A Bu) {B; print f ("%d", b)}
else {+; print f ("%d", a);}
D, if (A Bu) B; print f ("%d", b);
else print f ("%d", a);
Standard Answer: b
"1" is provided with an integer variable m value of 8, and the following assignment statement is correct.
A, Perper;
b, M M;
c, M 1;
D, Mp 1;
Standard Answer: b
"2". The following procedures
Cinclude Hai
void Fun (int $xmltag, int i, int j)
{
int t;
if (I Ji)
{
Tua]; A]; A J;
evaluating; J-e;
Fun (A, I, j);
}
}
void Main ()
{
int Xunsian, 6, 1, 8}, I;
Fun (x, 0, 3);
for (I; I 4; evaluating) print F ("Sian 2d", Xini]);
}
The output after the program runs is.
A, 1268