![](https://lstatic.shangxueba.com/jiandati/h5/images/m_q_title.png)
下段程序的运行结果是 void main() { char *p,*q; char str[]="Hello,World\n"; q = p = str; p++; print(q); print(p); } void print(char *s) { printf(“%s”,s); }
A.H e
B.Hello,World ello,World
C.Hello,World Hello,World
D.ello,World ell,World
A.H e
B.Hello,World ello,World
C.Hello,World Hello,World
D.ello,World ell,World
A、void GetMemory(char *p) { p = (char *)malloc(100); } void Test(void) { char *str = NULL; GetMemory(str); strcpy(str, "hello world"); printf(str); }
B、char *GetMemory(void) { char p[ ] = "hello world"; return p; } void Test(void) { char *str = NULL; str = GetMemory(); printf(str); }
C、void Test(void) { char *str = (char *) malloc(100); strcpy(str, "No!"); free(str); if (str != NULL) { strcpy(str, "hello world"); printf(str); } }
D、void GetMemory(char **p, int num) { *p = (char *)malloc(num); } void Test(void) { char *str = NULL; GetMemory(&str, 100); strcpy(str, "hello world"); printf(str); }
"); document.write(str.substring(3,5)); 输出结果为
A、lo wolo
B、lolo wo
C、llollo
D、lowolo
#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
A、Hello,
B、Hello,World!
C、,
D、Hello
#include
void main()
{
char,a[]={”hello",”the",”world”};
char**pa=a:
pa++;
cout$amp;}
A.hello
B.the
C.world
D.hellotheworld
A、(*p)max(a,b);
B、*pmax(a,b);
C、(*p)(a,b);
D、*p(a,b);
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!