输出结果与其他选项结果不同的一项是
A: double answer = (double) 13 / 5;
B: double answer = 13 / (double) 5;
C: double answer = 13.0 / 5;
D: double answer = 13 / 5.0;
E: double answer = (double) (13 / 5);
A: double answer = (double) 13 / 5;
B: double answer = 13 / (double) 5;
C: double answer = 13.0 / 5;
D: double answer = 13 / 5.0;
E: double answer = (double) (13 / 5);
举一反三
- 若要定义一个具有5个元素的double数组,以下错误的定义语句是 A: double a[5]=﹛0﹜; B: double b[]={0,0,0,0,0}; C: double c[2+3]; D: double d[5]={1,2,3,4,5,6,7};
- 若有定义doublex[3][5];则表达式x[0]的类型为()。 A: double B: double* C: double** D: double(*)[5]
- 定义一个存储5个学生成绩的数组不正确的是() A: int[] score = new int[5]; B: int score[] = new int[5]; C: double[] score; score = new double[5]; D: double[] score = new double[];
- 表达式2/5、2%5、(double)(2/5)和(double)2/5的值分别是_____、______、_____、_____。
- 下面函数定义中正确的是 。 A: double fun(double f1, double f2){ } B: double fun(double f1; double f2){ } C: double fun(double f1, double f2); { } D: double fun(double f1, f2){ }