相关题目
268、有以下程序
main()
{ int x=3, y=2, z=1;
printf( );
}
程序运行后的输出结果是______。
267、以下程序中函数scmp的功能是返回形参指针s1和s2所指字符串中较小字符串的首地址。
#include
#include
char *scmp(char*s1,char*s2)
{ if (strcmp(s1,s2)<0)
return(s1);
else return(s2);
}
main()
{ int i; char string[20],str[3][20];
for(i=0;i<3;i++) gets( );
strcpy(string,scmp(str[0],str[1]));/*库函数strcpy对字符串进行复制*/
strcpy(string,scmp(string,str[2]));
printf( );
}
若运行时依次输入:abcd、abba和abc三个字符串,则输出结果为______。
266、若有定义:int *p[3];,则以下叙述中正确的是______。
265、已定义以下函数
fun( )
{ return *p; }
该函数的返回值是______。
4) struct
{int red;
int green;
int blue;
}cl;
3) struct color
{ int red;
int green;
int blue;
}cl;
2) struct color cl
{ int red;
int green;
int blue;
};
1) typedef struct
{int red;
int green;
int blue;
} COLOR;
264、以下选项中不能正确把cl定义成结构体变量的是______。
263、有以下程序
main()
{ int k=4,n=0;
for( )
{ n++;
if(n%3!=0) continue;
k--; }
printf( );
}
程序运行后的输出结果是______。
