下面关于 java 中的数组,使用错误的是 ()。 A: int x[] = new int[]{1, 2, 3, 4}; B: int x[] = new int[4]; C: int[] x; x={1, 2, 3, 4}; D: int[] x = {1, 2, 3, 4};
下面关于 java 中的数组,使用错误的是 ()。 A: int x[] = new int[]{1, 2, 3, 4}; B: int x[] = new int[4]; C: int[] x; x={1, 2, 3, 4}; D: int[] x = {1, 2, 3, 4};
以下程序运行后的输出结果是。 #define PR(int) printf("int=%d\n",int) main { int x=1,y=1,z=1; x+=y+=z; PR(x<y?x:y); PR(x<y?x++:y++); PR(x); PR(y); PR(z+=x<y?x++:y++); PR(y); }: int=2 int=2 int=3 int=3 int=4 int=4|int=3 int=2 int=3 int=3 int=4 int=3|int=3 int=2 int=3 int=3 int=4 int=4|int=4 int=2 int=3 int=3 int=4 int=4
以下程序运行后的输出结果是。 #define PR(int) printf("int=%d\n",int) main { int x=1,y=1,z=1; x+=y+=z; PR(x<y?x:y); PR(x<y?x++:y++); PR(x); PR(y); PR(z+=x<y?x++:y++); PR(y); }: int=2 int=2 int=3 int=3 int=4 int=4|int=3 int=2 int=3 int=3 int=4 int=3|int=3 int=2 int=3 int=3 int=4 int=4|int=4 int=2 int=3 int=3 int=4 int=4
以下设置默认值的函数原型声明中错误的是 。 A: int add(int x , int y = 4 , int z ); B: int add(int x = 3 , int y = 4 ,int z = 5 ); C: int add(int x , int y , int z = 5); D: int add(int x , int y = 4 , int z = 5);
以下设置默认值的函数原型声明中错误的是 。 A: int add(int x , int y = 4 , int z ); B: int add(int x = 3 , int y = 4 ,int z = 5 ); C: int add(int x , int y , int z = 5); D: int add(int x , int y = 4 , int z = 5);
如下C程序的输出是什么?#include [stdio.h]void Func1 (int x, int y);void Func2 (int *x, int *y); int main() { int x = 3; int y = 4;Func1 (x, y); printf ("x = %d, y = %d\n", x, y);Func2(&x, &y); printf ("x = %d, y = %d\n", x, y);} void Func1 (int x, int y) { x = x + y; y = x - y; x = x - y; printf ("x = %d, y = %d\n", x, y);} void Func2 (int *x, int *y) { *x = *x + *y; *y = *x - *y; *x = *x - *y;;} A: x = 3, y = 4x = 3, y = 4x = 3, y = 4 B: x = 4, y = 3x = 4, y = 3x = 4, y = 3 C: x = 3, y = 4x = 3, y = 4x = 4, y = 3 D: x = 4, y = 3x = 3, y = 4x = 4, y = 3
如下C程序的输出是什么?#include [stdio.h]void Func1 (int x, int y);void Func2 (int *x, int *y); int main() { int x = 3; int y = 4;Func1 (x, y); printf ("x = %d, y = %d\n", x, y);Func2(&x, &y); printf ("x = %d, y = %d\n", x, y);} void Func1 (int x, int y) { x = x + y; y = x - y; x = x - y; printf ("x = %d, y = %d\n", x, y);} void Func2 (int *x, int *y) { *x = *x + *y; *y = *x - *y; *x = *x - *y;;} A: x = 3, y = 4x = 3, y = 4x = 3, y = 4 B: x = 4, y = 3x = 4, y = 3x = 4, y = 3 C: x = 3, y = 4x = 3, y = 4x = 4, y = 3 D: x = 4, y = 3x = 3, y = 4x = 4, y = 3
以下程序的输出结果是( )。main(){ int x=1,y=2; void swap(int x,int y); swap(x,y); printf("x=%d,y=%d\n",x,y);}void swap(int x,int y){ x=3,y=4;} A: x=3,y=4 B: x=1,y=2 C: x=3 y=4 D: x=1 y=2
以下程序的输出结果是( )。main(){ int x=1,y=2; void swap(int x,int y); swap(x,y); printf("x=%d,y=%d\n",x,y);}void swap(int x,int y){ x=3,y=4;} A: x=3,y=4 B: x=1,y=2 C: x=3 y=4 D: x=1 y=2
下面程序的运行结果是(<br/>)。 int fun (int x,int y) { x=x+y; return(x);}int main( ) { int x=2,y=4; y=fun (x,y); printf("x=%d y=%d\n", x, y);} A: x=2<br/>y=4 B: x=2<br/>y=6 C: x=6<br/>y=6 D: x=6<br/>y=4
下面程序的运行结果是(<br/>)。 int fun (int x,int y) { x=x+y; return(x);}int main( ) { int x=2,y=4; y=fun (x,y); printf("x=%d y=%d\n", x, y);} A: x=2<br/>y=4 B: x=2<br/>y=6 C: x=6<br/>y=6 D: x=6<br/>y=4
有以下程序void f( int y,int *x){y=y+*x; *x=*x+y;}main( ){ int x=2,y=4; f(y,&x); printf(“%d %d ”,x,y);} 执行后输出的结果是 A: 8 4 B: 4 2 C: 2 4 D: 4 8
有以下程序void f( int y,int *x){y=y+*x; *x=*x+y;}main( ){ int x=2,y=4; f(y,&x); printf(“%d %d ”,x,y);} 执行后输出的结果是 A: 8 4 B: 4 2 C: 2 4 D: 4 8
int x=4; int y=5; y=x*--y==++x*y?x++:y--; 求x=?,y=
int x=4; int y=5; y=x*--y==++x*y?x++:y--; 求x=?,y=
4、下面初始化数组语句()是不正确的。 A: int x[] = {1,2,3}; B: int x[3] = {1,2,3}; C: int[] x = {1,2,3}; D: int x[] = new int[]{1,2,3};
4、下面初始化数组语句()是不正确的。 A: int x[] = {1,2,3}; B: int x[3] = {1,2,3}; C: int[] x = {1,2,3}; D: int x[] = new int[]{1,2,3};
4、下面初始化数组语句()是不正确的。 A: int x[] = {1,2,3}; B: int x[3] = {1,2,3}; C: int[] x = {1,2,3}; D: int x[] = new int[]{1,2,3};
4、下面初始化数组语句()是不正确的。 A: int x[] = {1,2,3}; B: int x[3] = {1,2,3}; C: int[] x = {1,2,3}; D: int x[] = new int[]{1,2,3};