int x=1, y=2, z=0; z= x > y ? x+y : x; 则z= ( )
举一反三
- int x=1,y=2,z; z=(x!=y)? x+y : x;则z= ________ 。
- 以下选项错误的是 A.main() { int x,y,z; x=0;y=x-1; z=x+y;} B.main() { int x,y,z; x=0,y=x+1; z=x+y;} C.main() { int x;int int y; x=0,y=x+1; z=x+y;} D.main() { int x,y,z; x=0;y=x+1; z=x+y,}
- 以下程序的运行结果是_____________ #include "stdio.h" void main() { void add(int x,int y, int z); int x=2,y=3,z=0; printf("(1)x=%d y=%d z=%d\n",x,y,z); add(x,y,z); printf("(3)x=%d y=%d z=%d\n",x,y,z); } void add(int x,int y, int z) { z=x+y; x=x*x; y=y*y; printf("(2)x=%d y=%d z=%d\n",x,y,z); }
- 4.已知二元函数$z(x,y)$满足方程$\frac{{{\partial }^{2}}z}{\partial x\partial y}=x+y$,并且$z(x,0)=x,z(0,y)={{y}^{2}}$,则$z(x,y)=$( ) A: $\frac{1}{2}({{x}^{2}}y-x{{y}^{2}})+{{y}^{2}}+x$ B: $\frac{1}{2}({{x}^{2}}{{y}^{2}}+xy)+{{y}^{2}}+x$ C: ${{x}^{2}}{{y}^{2}}+{{y}^{2}}+x$ D: $\frac{1}{2}({{x}^{2}}y+x{{y}^{2}})+{{y}^{2}}+x$
- 以下函数形式中,正确的是( ) A: int func(int x,int y){ z=x+y; return z;} B: func(int x,y){ int z; z=x+y; return z;} C: func(x,y){ int x,y; int z; z=x+y; return z;} D: int func(int x,int y){ int z; z=x+y; return z;}