以下程序的输出结果是【 14 】#include stdio.h#include stdio.h#include stdlib.h#include string.hmain( ){ char *p,*q,*r,p=q=r=(char*)malioc( sizeof(char)*20);strcpy(p,"attaboy,welcome!");printf(”%c%c%c\n”,p[ 11 ], q[ 3 ],r[ 4 ]);free(p);}
以下程序的输出结果是【 14 】
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main( )
{ char *p,*q,*r,
p=q=r=(char*)malioc( sizeof(char)*20);
strcpy(p,"attaboy,welcome!");
printf(”%c%c%c\n”,p[ 11 ], q[ 3 ],r[ 4 ]);
free(p);
}
相关考题:
以下程序的输出结果是【】。 include include void main 0 { char s[50]; st 以下程序的输出结果是【 】。include<iostream.h>include <string.h>void main 0 {char s[50];strcpy(s[O], "No" );strcpy(s[1], "123" );strcpy (s[2], "23456" );cout<<s;}
有以下程序includemain(){int a=5,b=lt; t=(a 有以下程序 #include<stdio.h> main() { int a=5,b=lt; t=(a<<2)|b;printf("%d\n",t); } 程序运行后的输出结果是______。A.21B.11C.6D.1
有以下程序:当执行程序时,按下列方式输入数据(从第l列开始,<;CR>;代表回车,注意:回车也是一个字符]12<;CR>;34<;CR>;则输出结果是( )。A.12B.123C.1234D.12343
以下程序段中的变量已正确定义。for(i=0;i<;4;i++,i++)for(k=1;k<;3;k++);prinff(”*”);该程序段的输出结果是( )。A.*B.****C.**D.********
有以下程序段: inti,j,m=0; for(i=1;i<;=15;i+=4) for(j一3;j<;=19;j+=4)m++; printf(‘‘%d\n‘‘,m); 程序段的输出结果是( )。A.12B.15C.20D.25
若有以下程序执行时若输入:(其中<;Enter>;表示回车符)Fig flower is red.<;Enter>;则输出结果是A.wet is red.Fig Co is blue.B.wet is red.Fig floC.wet is red.The sky is blue.D.Fig flower is red.The sky is blue.