填空题

下列程序的输出结果是 【13】 。
main()

int a[]=2,4,6,*ptr=&a[0],x=8,y,z;
for(y=0;y<3;y++)
z=(*(ptr+y)<x)*(ptr+y):x;
printf("%d\n",z);

【参考答案】

F
<上一题 目录 下一题>
热门 试题

填空题
若有如下结构体说明: struct STRU int a,b;char c: double d; struct STRU *p1,*p2; ; 请填空,以完成对t数组的定义,t数组的每个元素为该结构体类型。 【16】 t[20]
填空题
下面的程序可对指定字符串中的字符串进行从大到小排序,请将程序填完整。(注:程序采用了冒泡排序算法) #include<stdio.h> #include<string.h> main() char *str= ABCDabcd ,temp; int n,i; n=strlen(str); while(n->1) for(i=0;i<n;i++) if(str[i]<str[i+1]) temp= 【17】 ; str[i]=str[i+1]; 【18】 =temp; printf( 【19】 );
相关试题
  • 以下程序段打开文件后,先利用fseek函数将...