C语言,结构体中的数组怎么赋值,?答:intmain(void){ structstudentsbao={};printf("%d,%s\n",bao.id,bao.name);//输出是4224528,空(应该是null)//structstudentsbao={3,"123"};可以。第一种赋值方法 //strcpy(bao.name,"bao");//可以,//printf("%d,%s\n",bao.id,bao.name);//bao.name="bao";错误“stray'\351'in...
C语言编程:用指针表示法给一维数组元素输入值,输出各元素的值及元素之...答:include <stdio.h> int main(){ int a[6],i,sum,*p;printf("Please input data of a[6]:\n");for(i=0,p=a;i<6;++i)scanf("%d",p++);printf("Output arry:\n");for(i=0,sum=0,p=a;i<6;++i){ printf("%d ",*p);sum+=*p++;} printf("\ns=%d\n",sum);return ...