相关题目
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(
302、有以下程序
main()
{ int x[]={1,3,5,7,2,4,6,0},i,j,k;
for(i=0;i<3;i++)
for (j=2;j>=i;j--)
if(x[j+1]>x[j]){ k=x[j];x[j]=x[j+1];x[j+1]=k;}
for (i=0;i<3;i++)
for(j=4;j<7-i;j++)
if(x[j]>x[j+1]){ k=x[j];x[j]=x[j+1];x[j+1]=k;}
for (i=0;i<8;i++) printf( );
printf( );
}
程序运行后的输出结果是______。
301、有以下说明和定义语句
struct student
{ int age; char num[8];};
struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}};
struct student *p=stu;
以下选项中引用结构体变量成员的表达式错误的是______。
300、设有定义语句:char c1=92,c2=92;,则以下表达式中值为零的是______。
