【单选题】以下程序的运行结果是( )。[br][/br] char *p="teacher"; [br][/br] [br][/br] p=p+3; [br][/br] [br][/br] printf("%s",p);
A: che
B: ache
C: eache
D: teache
A: che
B: ache
C: eache
D: teache
举一反三
- 以下程序段的运行结果是( )。[br][/br]char *p="abcdefgh",*r;[br][/br]long *q;[br][/br]q=(long *)p;[br][/br]q++;[br][/br]r=(char *) q;[br][/br]printf("%s\n",r);
- 8.下面程序段的运行结果是( )[br][/br]char str[]=“ABC”,*p=str;[br][/br]printf(“%d”,*(p+3));
- 请选出正确的程序段[br][/br]A)int*p; B)int*s,k;[br][/br]scanf("%d",p); *s=100;[br][/br]… …[br][/br]C)int*s,k; D)int*s,k;[br][/br] char*p,c; char*p,e;[br][/br] s=&k; s=&k;[br][/br] p=&c; p=&c; A: A)int*p;<br>scanf("%d",p);<br>… B: B)int*s,k;<br>*s=100;<br>... C: C)int*s,k;<br>char*p,c;<br>s=&k; D: D)int*s,k;<br>char*p,e;<br>s=&k;
- 有以下程序[br][/br]voidfun(intn,int*p)[br][/br]{intf1,f2;[br][/br]if(n==1||n==2)*p=1;[br][/br]else[br][/br]{fun(n-1,&f1);[br][/br]fun(n-2,&f2);[br][/br]*p=f1+f2;}[br][/br]}[br][/br]main()[br][/br]{ints;[br][/br]fun(3,&s);[br][/br]printf("%d\n",s);[br][/br]}[br][/br]程序的运行结果是(). A: 2 B: 3 C: 4 D: 5
- p>有以下程序[br][/br]main(){ inta[]={1,2,3,4,5,6,7,8,9,0},*p; for(p=a;p printf("%d,",*p);}程序运行后的输出结果是______。[br][/br]</p A: p>1,2,3,4,5,6,7,8,9,0, B: 2,3,4,5,6,7,8,9,10,1, C: 0,1,2,3,4,5,6,7,8,9, D: 1,1,1,1,1,1,1,1,1,1,