-
The type of the following C function is ( ).
fun (float f ){ printf ( " %f \n " , f ) ; } A. int B. float C. void D. Not sure Correct answer: A -
When calling a function, if the actual parameter is a simple variable, the data transfer method between it and the corresponding formal parameter is ( ).
A. Address transfer
B. One-way value transfer
C. From the actual parameter to the formal parameter, and then from the formal parameter to the actual parameter
D. Specified by the user
Correct answer: B -
The type of the following function value is ( ).
int fun(float x){ float y; y=3*x-4; return y; } A. int B. Not sure C. void D. float Correct answer: A -
The output of the following program is ( ).
#include <stdio.h>
void fun(){ int a,b; a=100; b=200; } main(){ int a=5,b=7; fun(); printf(“%d%d \n”,a,b); } A. 100200 B. 57 C. 200100 D. 75 Correct answer: B
-
The error in the following statement is ( ).
A. There can be no return statement in the user-defined function
B.
[C language] Test 7 function
Guess you like
Origin blog.csdn.net/m0_68111267/article/details/130613757
Recommended
Ranking