设已有定义char*st="how are you"; 下列程序段中正确的是()。
A.char a[11], *p; strcpy(p=a+1,&st[4])
B.char a[11]; strcpy(a,st)
C.char a[11]; strcpy(a,st)
D.char a[], *p; strcpy(p=&a[1],st+2)
A.char a[11], *p; strcpy(p=a+1,&st[4])
B.char a[11]; strcpy(a,st)
C.char a[11]; strcpy(a,st)
D.char a[], *p; strcpy(p=&a[1],st+2)
第1题
A.A.char a[11], *p; strcpy(p=a+1,&st[4]);
B.B.char a[11]; strcpy(a,st);
C.C.char a[11]; strcpy(a,st);
D.D.char a[], *p; strcpy(p=&a[1],st+2);
第2题
第3题
已有定义:char c= ;int a=1,b;(此处c的初值为空格字符),执行b=!c&Ra;后b的值为______。
第4题
第5题
方式是( )。(注:<CR>表示回车)
int a1, a2, ; char c1,c2;
scanf("%d%d",&a1,&a2);
scanf("%c%c",&c1,&c2);
第6题
A.int *p=(float)x
B.loat *p=&x
C.loat p=&x
D.loat *p=1024
第7题
以下程序的输出结果是______。
main()
{ char st[]:"hello\O\t\\";
printf("%d,%d\n",strlen(st),sizeof(st));
}
第8题
用以下语句调用库函数malloc,使字符指针st指向具有11个字节的动态存储空间。 st=(char*)【 】;
第9题
以下程序用来输出结构体变量ex所占存储单元的字节数,请填空。
struct st
{char name[20];double score;};
main()
{struct st ex;
printf("ex size:%d\n",sizeof(______);
}
第10题
#include<stdio.h>
void fun(char *fiame.,char *st)
{ FILE *myf; int i;
myf=fopen(Name,"w");
for(i=0;i<strlen(st);i++)fputc(st[i],myf);
felose(myf);
}
main()
{fun("test", "new world");fun("test","hello,");}
A.hello, B.new worldhello, C.new world D.hello,rld