若有定义语句:"int a[4][10],*P,*q[4];"且0≤i<4,则错误的赋值是( )。 p=a 。 q[i]=a[i]。 p=a[l]。 P=&a[2][1]。
以下函数findmax拟实现在数组中查找最大值并作为函数值返回,但程序中有错导致 不能实现预定功能。 #define MIN-2147483647int findmax(int x[],int n){int i,max; for(i=0;i<n;i++) {max=MIN; if(max<x[i])max=x[i];) return max; }造成错误的原因是( )。 定义语句“int i,max;”中max未赋初值。 赋值语句“max=MIN;”中,不应给max赋MIN值。 语句“if(max<x[i])max=x[i];”中判断条件设置错误。 赋值语句“max—MIN;”放错了位置 。
有以下程序 #include<stdio.h>main( ){int n=2,k=0; while(k++&&n++>2); printf("%d%d",k,n); }程序运行后的输出结果是( )。 O2 。 13。 57 。 12。
有以下程序: #include<stdio.h>main( ){int a=2,b=2,c=2; print{("%d",a/b&c); }程序运行后的输出结果是( )。 0 。 1。 2 。 3。
有以下定义和语句: struct workers {int num;char name[20];char C; struct {int day;int month;int year;)S; }; struct workers w,*pw; pw=&w; 能给w中year成员赋1980的语句是( )。 *pw.year=1980; 。 w.year=1980;。 pw->year=1980。 w.S.year=1980; 。
若有下的定义:"int t[3][2];",能正确表示t数组元素地址的表达式是( )。