【单选题】关于下面的程序,正确的说法是_________。 #include void main() { float a=b=2, result; result=a/b; printf("result=%f
", result); }
A. 程序可正常编译,结果为result=1.000000 B. 共有1处语法错误 C. 共有2处语法错误 D. 共有3处语法错误
", result); }
A. 程序可正常编译,结果为result=1.000000 B. 共有1处语法错误 C. 共有2处语法错误 D. 共有3处语法错误
举一反三
- 关于下面的程序,正确的说法是_________。 #include stdio.h void main() { float a=b=2, result; result=a/b; printf('result=%f ', result); }
- 6. #include "stdio.h" void main( ) {int k , result=0; for(k=1;k<=6;k++) result+=k*k; } 程序中 result 结果为 ______
- 【单选题】下面 C代码的输出结果是()。int answer,result;answer=100;result=answer-10;printf( “The result is %d” , result+5); A. The result is 90 B. The result is 95 C. The result is 10 D. The result is 100
- 写出下面程序的输出( )。 public class Test { public static void main (String args[ ]) { iht x=1, y=2; System. out. println ("result="+x+y); System. out. println ("result="+(x+y)); A.result=12 result=12 B.result=3 result=3 C.result=3 result=12 D.result=12 result=3
- 下面程序段的输出结果是( )。 public class Test public static void main ( String[] args) int result=0; for ( int i=1;i<=5;i++) if ( i%2==0 ) continue; result + =i; System. out. println ("result is " + result ); A: result is 7 B: result is 8 C: result is 9 D: result is 10