1, the following description is incorrect.
(a) When calling a function, the independent variable can be an expression.
(b) When calling the function, the real parameter can use the storage unit.
(c) When the function is called, a storage unit will be allocated for the parameter.
(d) When calling a function, the types of real parameters must be consistent.
2. The following statement is correct.
(1) The main function of C language is nonparametric function.
(b) The main function of C language can have at most 1 parameters.
(c) The main function of C language allows at most two formal parameters.
(d) The main function of C language can have more than two formal parameters.
3. The type of function return value in C language is determined by.
(a) Returns the expression type in the statement.
(b) The type of tonic function of the calling function
(c) The call to the function is temporary.
(d) The function type specified when defining the function.
4. If x is an int variable, the following function is interesting.
Fun (int x)
{
printf("%d ",x);
}
(a) The return value is of type void.
(b) The return value cannot be determined.
(c) The type of the return value is int.
(d) No return value.
5. The following incorrect description is.
(a) Variables with the same name can be used in different functions.
(b) The formal parameter is a local variable.
(c) Variables defined inside a function can only be valid within the scope of the function.
(d) Variables defined in compound statements within a function are valid within the scope of the function.
6. According to C language, when calling a function, the data transfer between real parameter variables and formal parameter variables is.
(1) Address transmission
Value transfer
(c) Count from the real parameter to the shape parameter, and then return to the real parameter x from the shape parameter.
(d) The delivery method is specified by the user.
7. If the array name is used as an argument when calling the function, what is actually passed to the parameter is.
(a) array header address
(b) The value of the first element of the array.
(c) the values of all elements in the array
(d) Number of array elements
8. For variables whose storage category is not specified in the function, the implied storage category is. //should be a local variable.
automobile
(2) Static
(c) extension
register
9. In C language, for variables of storage type, memory cells are occupied only when they are used.
Static and automatic
Registered and day students
(3) Registers and statics
(d) automatic registration
10. The range of global variables defined in the source file is.
(a) The full scope of this document
(b) The full scope of this procedure
(c) The full scope of this function
(d) From the position where the variable is defined to the end of the file.
1 1. In the C source file, if you want to define a global variable that can only be used by all functions in the source file, then the storage category that the variable needs to use is.
(a) External personnel
register
automobile
(4) Static
12, the following description is incorrect.
(a) Variables defined outside the function are called external variables and are global variables.
(b) You can use both local variables and global variables in a function.
(c) The definition and description of external variables have different meanings.
(d) If an external variable has the same name as a local variable in the same source file, the external variable is invalid within the scope of the local variable.
13, the following correct form of function definition is.
(a) Double funding (int x, int y)
(b) Double funding (int x;; int y)
(c) Double funding (int x, int y);
(d) Double funding (int x, y);
14, the following statement is correct.
(a) Real parameters and their corresponding shape parameters occupy independent storage units.
(b) The real parameter and its corresponding shape parameter * * * occupy one storage unit.
(c) Only when the actual parameter and its corresponding formal parameter have the same name, the storage unit is used.
(d) The formal parameters are virtual and do not occupy storage units.
15. If a function is called and there is no return statement in this function, then the correct statement is.
(a) There is no return value.
(b) Return several system defaults.
(c) It can return the function value expected by the user.
(d) Returns an uncertain value.
16, the following statement is correct.
(a) When defining a function, the type description of formal parameters can be placed in the function body.
(The value after return cannot be an expression.
(c) If the function type is inconsistent with the return value type, the function type shall prevail.
(d) If the types of formal parameters are inconsistent, the types of formal parameters shall prevail.
17, the following program has a syntax error, and the correct statement about the cause of the error is.
Master ()
{int G=5,K;
void Prt _ char();
……
k = Prt _ char(G);
……
}
(a) statement void PRT _ char (); Error, is a function call statement, and cannot be explained by void.
(b) Variable names cannot use uppercase characters.
(c) There is a contradiction between the function description and the function call statement.
(d) Function names cannot be underlined.
18, the following is the correct description.
(1) The definition of a function can be nested, but the call of a function cannot be nested.
(b) The definition of a function cannot be nested, but the call of a function can be nested.
(c) Neither the definition of a function nor the call of a function can be nested.
(d) Both the definition of the function and the call of the function can be nested.
19, the following statement is correct.
If a variable is defined in a compound statement of a function, the variable
(a) It is only valid in compound statements.
(b) Effective in this function.
(c) Effective within the scope of this procedure.
(4) Description of illegal variables
20. The correct operation of the following program results in.
f(int a)
{ int b = 0; Static int c = 3;;
b++; c++;
Return (a+b+c);
}
Master ()
{int a=2,I;
for(I = 0; I<3; i++) printf("%4d ",f(a));
}
(A) 7 7 7 (B) 7 10 13
(C) 7 9 1 1 (D) 7 8 9
2 1. Please select the correct operation result and fill it in.
# include & ltstdio.h & gt
fun(int x,int y)
{static int m=0,I = 2;
I+= m+ 1;
m = I+x+y;
Return (m);
}
Master ()
{
int j=4,m= 1,k;
k=fun(j,m);
printf("%d ",k);
k=fun(j,m);
printf("%d\n ",k);
}
20 (B) 8,8 (C) 8, 17 (D) 8, 16
22. Please select the correct operation result and fill it in.
# include & ltstdio.h & gt
int x,y;
Number ()
{
int a= 15,b = 10;
int x,y;
x = a-b;
y = a+b;
Return;
}
Master ()
{int a=7,b = 5;
x = a+b;
y = a-b;
num();
printf("%d,%d\n ",x,y);
}
12,2 (b) 5,25 (c) 2, 12 (d) uncertain.
Fill in the blanks
The statement of 1.C language program should contain at least one _ _ _ _ _.
2. The extension of source program file in C language is _ _ _ _ _ _. After compiling the connection, the extension of the generated file is _ _ _ _ _.
3. Structured programs are composed of three basic structures: sequence structure, _ _ _ and _ _ _ _.
4. The execution of C language starts from _ _ _ _ _.
5. The statement separator of the C source program is _ _ _ _ _ _.
6. In C language, the keyword _ _ _ is used to define a single-precision real variable.
7. The expression S= 12 should be read as "_ _".
8. The basic unit of the C language source program is _ _ _ _ _.
9. Let int x = 9 and y = 8;; The result of the expression x-=y+ 1 is _ _ _ _ _.
10. If a is an integer variable and a= 12, the value of the expression: a * = 2+3 _ _ _.
1 1. When calling the library function of C language for input and output processing, the header file that # include command line should contain is _ _ _ _ _ _.
12, the result of expression 9%5 is _ _ _ _ _.
13. if a is an integer variable and a= 12, the expression: a+=4 value _ _ _.
14. In C language, the operator that requires the operand to be an integer is _ _ _ _ _.
15. In C language, the logical "true" value is represented by _ _ _ _.
16,7 and the expression 10/3 result in _ _ _ _.
17, usually a byte contains _ _ _ _ binary bits.
18, assuming that all variables are integers, a = 2, b = 5, b++, then the value of expression a+b is _ _ _ _ _.
19. In C language, there are only four basic data types, namely _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
20. A C program has one and only one _ _ _ _ _ function.
2 1. If a is an integer variable and a= 12, the expression: the value of a-=2 _ _ _.
22. In C language, there are three kinds of logical operators, which are _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _.
23. In C language, the character input function and the character output function are _ _ _ _ and _ _ _ _ respectively.
24. The four steps of C program development are _ _ _ _ _ _ _ _ _ _ _ and execution.
25. The structure of program C is: sequence structure, _ _ _ _ _ _ _ _ _ _.
26. The expressions in the IF statement can be relational expressions, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _.
27. _ _ _ _ is the only ternary operator in C language.
28. There are three kinds of preprocessing commands provided by C language: macro definition, _ _ _ _ _ _, _ _ _ _ _.