13、函数sstrcmp()的功能是对两个字符串进行比较。当s所指字符串和t所指字符串相等时,返回值为0;当s所指字符串大于t所指字符串时,返回值大于0;当s所指字符串小于t所指字符串时,返回值小于0(功能等同于库函数strcmp())。请填空。
#include
int sstrcmp(char *s,char *t)
{ while(*s&&*t&& *s== [15] )
{ s++;t++;}
return [16] ;
}
14、下面程序的运行结果是 [17] 。
#define N 10
#define s(x) x*x
#define f(x) (x*x)
main()
{ int i1,i2;
i1=1000/s(N); i2=1000/f(N);
printf(“%d %d\n”,i1,i2);
}
15、下面程序的运行结果是: [18] 。
void swap(int *a,int *b)
{ int *t;
t=a; a=b; b=t;
}
main()
{ int x=3,y=5,*p=&x,*q=&y;
swap(p,q);
printf(“%d%d\n”,*p,*q);
}
16、下面程序的运行结果是: [19] 。
typedef union student
{ char name[10];
long sno;
char sex;
float score[4];
}STU;
main()
{ STU a[5];
printf(“%d\n”,sizeof(a));
}
17、若fp已正确定义为一个文件指针,d1.dat为二进制文件,请填空,以便为“读”而打开此文件:fp=fopen( [20] );。
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页
责任编辑:cyth