相关题目
312、请读程序:
#include
func( ){
int c;
c=a+b;
return c;
}
main( ) {
int x=6,y=7,z=8,r;
r=func(
311、请读程序:
#include
#include
main()
{
char *s1="AbCdEf", *s2="aB";
s1++; s2++;
printf("%d\n",strcmp(s1,s2) );
}
上面程序的输出结果是______。
310、以下选项中,能定义s为合法的结构体变量的是______。
309、以下程序的输出结果是______。
main()
{ int a=-1,b=1, k;
if((++a<0)&&!(b--<=0))
printf( );
else
printf( );
}
308、若已定义:int a[9],*p=a;并在以后的语句中未改变p的值,不能表示a[1]地址的表达式是______。
307、以下程序的输出结果是______。
main()
{ char a[10]={'1','2','3','4','5','6','7','8','9',0},*p;
int i ;
i=8;
p=a+i;
printf("%s\n",p-3);
}
306、以下程序的输出结果是______。
main()
{ int i,x[3][3]={9,8,7,6,5,4,3,2,1},*p=&x[1][1];
for(i=0;i<4;i+=2) printf( );
}
305、以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转储到链表的各个结点中,请为下划线处有号码的选择出正确的选项。
#include
stuct node
{ char data; struct node *next;};
______ CreatList( )
{ struct node *h,*p,*q);
p=q=h;
p->data=______ ;
q->next=p;
s++;
}
p->next='\0';
return h;
}
{ char str[]="link list";
struct node *head;
...
}
304、以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转储到链表的各个结点中,请为下划线处有号码的选择出正确的选项。
#include
stuct node
{ char data; struct node *next;};
______ CreatList( )
{ struct node *h,*p,*q);
p=q=h;
q->next=p;
q=______ ;
s++;
}
p->next='\0';
return h;
}
{ char str[]="link list";
struct node *head;
...
}
303、以下程序的功能是:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转储到链表的各个结点中,请为下划线处有号码的选择出正确的选项。
#include
stuct node
{ char data; struct node *next;};
___(48)___ CreatList( )
{ struct node *h,*p,*q;
h=( ) malloc(
