单项选择题

有以下程序:
int *f(int *x, int *y)

if (*x<*y)
return x;
else
return y;

main()

int a=7,b=8,*p,*q,*r;
p=&a; q=&b;
r=f(p,q);
printf ("%d,%d,%d\n",*p,*q,*r);

执行后输出结果是( )。

A.7,8,8
B.7,8,7
C.8,7,7
D.8,7,8
<上一题 目录 下一题>
热门 试题

单项选择题
设有如下程序: #include’string.h main() static char s1[20],s2[20]; scanf( %s ,s1);scanf( %s ,s2); if(strcmp(s1,s2)) printf( @ ); else printf( $ ); printf( %d n ,strlen(strcat(s1,s2))); 如果从键盘上输入name1<回车>name2<回车>,则程序运行后的输出结果是( )。
A.$9
B.@11
C.$10
D.@10
单项选择题
(48)~(50)以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请从与下划线处号码对应的一组选项中选择出正确的选项。 #include <stdlib.h> struct node char data; struct node *next;; (48) CreatList(char *s) struct node *h,*p,*q; h=(struct node *)malloc(sizeof(Struct node)); p=q=h; while(*s!=‘ 0’) p=(struct node *)malloc(sizeof(struct node)); p->data=(49); q->next=p; q=(50); s++; p->next=0; return h; main() char str[]= link list ; struct node *head; head=CreatList(str);
A.char*
B.stmct node
C.strumnode*
D.char
相关试题
  • 有以下程序: #include <stdlib.h> ...
  • 有以下程序: main() char k; int ...