There are the following programs, if you input 18,11from the keyboard at run time, the output of the program will be ______ . int main (void) { int a,b; printf("Enter a,b:"); scanf("%d,%d",&a,&b); while(a!=b) { while(a>b) a-=b; while(b>a) b-=a; } printf("%d,%d\n",a,b); return 0; }
查看答案
Of the following function calls, the incorrect is ( ).
A. max(a,b);
B. max(3,a+b);
C. max(3,6);
D. max(3,6);
The value of variable a is ( ) after executing the following procedure. fuc1(float x) { return x+1.5; } int main(void) { float a; a=fuc1(2.4); return 0; }
A. 4
B. 3.7
C. 3.0
D. uncertain
There are the following function definitions: void fun(int n,double x) {…} If the variables in the following options are correctly defined and assigned values, the correct call statement for function fun is ( ).
A. fun(int y,double m);
B. k=fun(10,12.5);
C. fun(x,n);
D. void fun(n,x);
In the C statement, the default storage type of formal parameters is ( ).
A. auto
B. register
C. static
D. extern