单项选择题
有以下程序:
main()
char str[]="xyz", *ps=str;
while(*ps) ps++;
for(ps--;ps-str>=O;ps--)
puts(ps);
执行后的输出结果是( )。
A.yz
xyz
B.z
yz
C.z
yz
xyz
D.x
xy
xyz
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: main() int a=7,b=8,*p,*q,*r; p=&a; q=&b; r=p; p=q; q=r; printf( %d,%d,%d,%d n ,*p,*q,a,b); 程序运行后的输出结果是( )。
A.8,7,8,7
B.7,8,7,8
C.8,7,7,8
D.7,8,8,7
点击查看答案&解析
单项选择题
以下程序段中,能够通过调用函数fun(),使main()函数中的指针变量p指向一个合法的整型单元的是( )。
A.main()
int*p;
fun(p);
…
int fun(int*p)
int s; p=&s;
B.main
int*p
fun(&p);
…
iht fun(int**p)
int s; *p=&s;
C.main()
int*p;
fun(&p);
int fun(int**p)
*p=(int*)malloc(2);
D.main()
int*p;
fun(p);
int fun(int*p)
p=(int*)malloc(sizeo(int));
点击查看答案&解析
相关试题
有以下程序: main() int x[]=1,...
有以下结构体说明和变量定义,如下图所示,...
有以下程序: void fun(int *a,int ...
有以下程序: void fun (char *a,ch...
在结构化设计方法中生成的结构图(SC)中,...