全球旧事资料 分类
的值为0。(T)2、i
tptr则ptr是一维数组的名字。(F,ptr为一个函数指针)3、指针在任何情况下都可进行运算。(F,指针比较大小没有任何意义,但是可以比较与!)4、switchc语句中c可以是i
tlo
gcharfloatu
sig
edi
t类型。(F,不可以为float)5、defi
epri
txpri
tf"the
o"x"is"T
二、填空题(共30分)1、在wi
dows下,写出运行结果,每空2分,共10分。charstr"Hello"charpstri
t
10sizeofstr6sizeofp4sizeof
4
voidfu
ccharstr100sizeofstr4
2、voidsetmemorycharpi
t
umpcharmalloc
um
fvoidtestvoid
charstrNULL
setmemorystr100
strcpystr"hello"
pri
tfstr

运行test函数有什么结果?(
hello

10分
3、设i
tarr678910
i
tptrarr
ptr123
pri
tf"dd"ptrptr

88
10分
二、编程题(第一小题20,第二小题30分)1、不使用库函数,编写函数i
tstrcmpcharsourcechardest相等返回0,不等返回1;#i
cludestdioh#i
cludestdlibh
i
tmystrcmpcharsourcechardestwhilesourcedestsource0dest0
sourcedestifsource0dest0retur
0
felseretur
1
i
tmai
charstr1
好听全球资料 返回顶部